Anda di halaman 1dari 22

BO Universe design tutorial Business Objects Universe

The BusinessObjects universe is a business representation of organization's data that helps end users access data autonomously using common business terms and it isolates business users from the technical details of the databases where source data is stored. Universes are made up of objects and classes that are mapped to the source data in the database and accessed through queries and reports. Users retrieve data using descriptive terms used in the business environment with the company's business terminology. Universe is a semantic layer that maps complex data into descriptive business terms used across the organization, such as product, customer, region, revenue, margin or costs.

Benefits of using Universes


The main benefits that come with Universes are:

y Separate business and IT responsibilities - only the metadata modeler (universe designer) needs to know SQL and understand the complex database structure. y The Universe Designer application allows users to create universes in a simple, intuitive graphical environment. y Data security - data exposed by the universe can be limited to a specific group of users. y Maintenance of the universe is easy y End-users can use a simple interface to create reports and analysis and work with consistent business terminology.

BusinessObjects Universe Designer


It is a client application, accessible after the installation in Start -> Programs -> Business Objects XI -> BusinessObjects Enterprise -> Designer. A high-level overview of the universe creation process is the following: 1. Analysis of the end-user requirements is the most important task in the process. Users must be involved in the universe development process as it should fulfill their needs both with the business language and naming convention and the data that can be accessed. It strongly advisable to spend most of the universe development time and put much effort in the Preparing, Analyzing and Planning phases. 2. Log on to the BO Repository and select on of three available options for opening universes: Create a new universe, Import a universe from the repository, Open a universe directly from the file system. 3. A universe becomes visible in the SAP BusinessObjects platform and is available for reporitng once it has been exported to the repository. Thus in most cases working with Universe Designer includes three steps: importing a universe, making changes, then deploying the universe to the repository.

4.

Connect to the source database where data is stored using a connection wizard and save the connection parameters. Universe Designer can store connection definitions to multiple data sources, however only one connection can be defined for each universe.

5.

The database tables and views are selected and browsed through a graphical interface in the Universe Designer (a schema diagram). The schema diagram interface is used for manipulating tables, creating joins, alias tables, contexts and resolve loops in the schema definition.

6.

An object explorer view provides a windows-explorer-like tree to represent and arrange objects that map to the columns and SQL structures, represented in the schema view. When building reports and performing analysis, business users select these objects to run queries against a database.

7.

Building the universe inludes the following sub-tasks performed by a developer: Name the universe, Set up the universe parameters and connect to the data source, Create aliases and contexts, Create joins, Create classes, subclasses and objects, Define dimensions, details and measures, Define hierarchies, Define lists of values and help text, Define filters and implement user security.

8.

Once the universe has been built, tested and has passed all quality assurance checks it is ready to be deployed to the production environment.

Working with BusinessObjects Universe Designer


The operational commands can be issued in Universe Designer in a few ways:

y Menu options - the menu bar has standard options known from other windows based applications, which are: File, Edit, View, Insert, Tools, Window and Help y Toolbar buttons - three toolbars are available: Standard toolbar, Editing toolbar, Formula Bar toolbar. y Right-click menus - display on the screen when the right mouse button is clicked. These menus usually give developers access to options related to the performed task, for instance doing a right-click in the Universe pane shows a drop-down menu for creating classes and objects.

Universe Designer window


The BO Universe Designer window is split into two main areas:
y

Structure pane - located on the right-hand side. The place where users insert the database tables and view the universe structure that generates the FROM and SELECT clauses into a SQL statement. The structure pane is a dynamic graphical view which can be adjusted easily and navigated with such commands as zoom, arrange tables option, drag and drop operations, roll-up/unroll tables (show all columns or table header only). Furthermore, a View table/column values option is available for gaining a partial view of the data content of the given table or column. Universe pane (object explorer) - located on the left-hand side, in which users create the classes and objects seen later when building queries using the given universe. The objects physically point to the tables from the Structure pane.

Universe designer view with object explorer view (left-hand side) and a schema diagram (in the center)

Schema design: adding tables


A Table Browser a component available in the Universe Designer which allows the designer to select tables from the target database (it shows a list) and place them on a structure pane, which shows a visual the representation database, of the physical be data easily structure to which into the the universe is mapped. schema. The Table Browser is an independent window that shows a tree view of the tables, views and columns in which can inserted designed

The Table Browser can be invoked using one of the following methods:

y Click the Table Browser button. y Select Insert Tables from the menu. y Double-click the background area of the structure pane. y Right-click the Structure pane and choose Tables from the drop-down menu. Single tables or multiple tables simultaneously can be inserted into the schema (with drag and drop, an insert button or just double-clicking a table). The Table Browser can be also used to preview the source data in a table or a column of an underlying database. To do this, expand a table in the Table Browser, right-click a column or the entire table and click View Table Values. To get a better view of the t

Schema design: creating joins between the tables

Joins create a relationship between the tables so that the correct data is returned for queries that are run on multiple tables and ensure that the data is combined in a meaningful way.

If no joins are specified in a database structure, the resulting query produces a Cartesian product, which outputs a report that joins every column in the first table to every column in the second table. There are several approaches to defining joins in Universe Designer:

y Manually in the schema, graphically by using the mouse to drag a line between columns in separate tables. y In the Edit Join dialog box - select Insert -> Join from the menu or click the Insert join button. y Using the Join SQL Editor to explicitly type in the join expression. y Joins can also be detected and created automatically. Be careful using this method as it might produce errors because of the fact that the algorithm uses column names as the key for creating joins.

Join properties
Each join has the following properties to define:
y y y y y y y

Table1 - table at the left of the join. Table2 - table at the right of the join. Operator - defines how the tables are joined. The available operators are: =, !=, >, >=, <, <=, Between (theta join) or Complex Outer Join - determines which table contains unmatched data in an outer join relationship. Cardinality - defines the cardinality for the join. Shortcut Join Expression - an editable WHERE clause used to filter the data that is returned when the two joined tables are included in a query.

Join cardinality
The join cardinality defines how many rows in one table will match those in the other. Universe Designer uses cardinality to detect and resolve loops. The cardinality can be: -One-to-one(1-1) -One-to-many(1-N) -Many-to-one(N-1) - Many-to-many (N-N) Join cardinality can be set manually or with the automatic detection tool. For efficiency (detection tool runs 3 queries on every join, which can take a long time) and accuracy (works ok only with totally normalized data) it is strongly advised to apply cardinality manually.

Schema design: creating dimensions


Dimension objects and classes form Business Objects universes. Objects in a universe are grouped into classes and each object must belong to a class. Classes can be

defined as folders and can contain subfolders to form a tree hierarchy and break down objects into subsets. Objects represent meaningful entities, facts or calculations that end users see in the Business Objects enduser querying tools (WebIntelligence for instance). End-users select objects (or drag them from Query Panel Data Tab into the Result Objects pane) to build and run queries and reports.

Each object in a Business Objects universe can be one of the following types:

Dimension is a main analysis object in a query. It maps to one or more key columns in a database (key to a query, not necessarily primary key database columns). Dimension objects can be organized hierarchically within a class to make default hierarchies for drill-down operations. For example, time can be a dimension with year-month-day hierarchy.

y y

Detail - provides descriptive detail data about a dimension (maps to one or more columns or functions). For example, a month name in time dimension can be a detail of month index. Measure - provides metrics (aggregated numbers) by which dimensions are compared.

To understand the concept better, in the screenshot below there is an example of a store dimension, where: - Store is the name of the dimension - Store and Store Details are classes (Store Details is a subclass of Store) - State, City, etc... are dimension objects - Zip code and address are dimension details objects - Extended sales floor size is a measure object Store dimension example

Creating dimension classes and objects


There are several ways to create dimension classes and objects in the Universe Designer: The easiest way to create classes and objects is simply by dragging the entire table from the Structure pane into the Universe pane in Universe Designer. It is necessary to review all objects and set properties like change names, enter descriptions, object classification.

y y

Click an existing class in the Universe pane and select Insert->Class from the menu or Insert Class from the Editing toolbar or doing a right mouse click. To create an object, click an existing class in the universe pane and select Insert->Object from the menu or Insert Object from the Editing toolbar or doing a right mouse click. The Edit properties window will pop up

Schema design: creating measures


Measure objects provide calculated numeric information (aggregated numbers) by which dimensions are dynamically compared. Measures are flexible as the values they store depend on the dimension objects used with them. Measure object are calculate with one of the aggregate functions. SAP Business Objects provides the following most commonly used basic types of aggregation:

y y y y y

Sum Count Average Maximum Minimum The full set of aggregate functions is listed in the Number Functions selection list of the Edit Select

Statement window. Sample measures folder

From the technical point of view and speaking the SQL language, whenever a query contains measures with dimensions, a SELECT with GROUP BY statement is created. Whenever the SELECT statement contains an aggregate, every dimension column of that aggregate must appear in the GROUP BY clause and measures must include an aggregate functions (sum, avg, etc.). There are two levels of aggregation in the SAP BusinessObjects query process: at SELECT level and at projection level. Aggregation at SELECT level starts when a query is created by an user, a reporting tool creates the SQL and sends a SELECT statement to the database. Then the data is returned to a microcube where the first level of aggregation occurs, the microcube projects the aggregated data onto a report, the SQL is run and the microcube gets the results. Aggregation at projection level means that when a query is run and the resultset is loaded into the microcube, all from that microcube is projected into a table or chart in the report (a block). Therefore, no projection aggregation takes place.

SAP BusinessObjects Web Intelligence


Web Intelligence is a tool for analyzing the organization's business information and creating ad-hoc reports. Web Intelligence is a tool for business users which provides an easy-to-use interface for analyzing data in a data warehouse to help with the decision-making business process. Its capabilities range from basic and simple to very complex reports and webintelligence allows users to share the information throughout the enterprise easily. Business analysts access the information using their everyday business vocabulary without having to understand anything about the technical way the information is stored in the data warehouse.

Web Intelligence is accessed from the SAP BusinessObjects portal InfoView via an internet browser. Once opened, users can create and edit Web Intelligence documents and analyze the data displayed in them. With the InfoView portal those documents can be shared with other users, scheduled, printed out or send via email. Web Intelligence uses universes (created by datawarehouse developers or modelers) to access the data and provide a business oriented view of the data. This results in the fact that the users have access directly to the source database allowing for robust query and analysis options (they are not limited to a personalized OLAP cube for instance) which helps significantly in responding to everyday questions and resolving problems.

Web Intelligence query


This lesson explains how Web Intelligence queries and retrieves data from the data warehouse To create a Web Intelligence document select universe you want to use. Universe is a collection of classes and objects that maps you to business information stored in a data warehouse. Second step after selecting the universe, is building a query using objects from the Universe pane (left hand side of the screen). Objects are stored in folders and are divided to dimensions, measures and details. Dimensions are objects that divide report into columns and rows, for example dates, customer names or countries. Dimension objects are usually mapped to character-type data. Measures are objects that fill the inside of reports and are usually mapped to numeric data for example sales revenue or income. Detail objects bring extended or additional information abaut dimensions for example Postal Code can be a detail of Address dimension. To built a query drag-and-drop objects you want to use to Result Objects pane. Graphical presentation of different types of objects is provided below:

Creating a Web Intelligence report


To create a Web Intelligence report using InfoView you need to: Select Document list tab from the top menu or select it from Navigate pane. After that you should see documents grouped in folders. Amount of documents or reports you see may depend on level of your authentication

y y y y y

Select New tab from menu that appears under the top menu, than select Web Intelligence Document Choose the Universe you want to use from the list to build a query. After you have chosen a universe you should see Edit Query view. Drag and drop objects you want to use to Result Objects pane. Objects in this pane will be avaible in Edit Report view. To see SQL statement of the query click on Viw SQL button on the top menu. You can also drop objects into Query filters pane. This will reduce amount of result records by setting a filter. If your query is ready, click Run query button. This will bring you to Edit Report view. Now you should see a default report, which you can custumize in many ways.

You can always back to Edit Query view by selecting Edit Query button.

Query filters
There are several types of query filters you can create:

Quick filters - filters set by user on report They are the most important or most often used data limitations. Predefined filters are always avaible, so users don't have to specify them each time they're creating a query. To select a predefined filter, just drag-and-drop it to the Query Result pane or simply double-click it.

y y y y

Predefined filters - defined in universe Custom filters - created by user Prompts - dynamic filters displayed after refreshing document

Custom filters
Custom filters are restrictions or limitations of data defined by a user during creating a query. To create a custom filter drag-and-drop an objects you want to, you want to set filter on to Query Filters pane. Then you need to set an operator and type a value that limits data retrieved by query. In case you have selected the In list operator, you can type multiple values. You can set several custom filters on one query, but in some cases setting to many filters may cause that no data will match your limitations.

Prompts
Prompt is a dynamic filter that displays a question every time you refresh a report. You type or select values that you want to limit the data retrieved from database by a query. No other data will be avaible on the report. To set a prompt you need to:

y y

Drag-and-drop an object you want to set filter on to Query Filters pane Change the proprerties of the filter by select Prompt

y y

Enter the question that will be displayed after refreshing the report Click Run Query. Prompts window will appear. Select the values of the filter that you want to retrieve from the database and click Run query. The same window will appear if you select Refresh Data on Edit Report view.

Quick filters
Quick filters are filters that user can set on any report. They do not have any influence an retfrieved data, they only limits the data displayed on a report. To set a quick filter, in the Edit report view select a column that you want to filter values from. Than click Add filter button, in List of Values window select values you want to be displayed on the report and click OK.

Designing reports
You place objects on reports simply by draging-and-dropping objects you want to use on a report. You can place objects in headers of a column or rows to create a headers or place them in the inside of a report to fill it with data. Usually you put dimensions objects as headers and measures as the inside of a report. The place where you drop an object in a particular cell matters. If you drop an object:

y y y y y

In the center of a cell - it will fill this cell with data On the top of a cell - it will add a row above this cell and fill it with data In the bottom of a cell - it will add a row below this cell and fill it with data On the left side of a cell - it wil add a column on the left and fill it with data On the right side of a cell - it wil add a column on the right and fill it with data

There are several basic report templates you're able to use to design a report:

y y y y

Horizontal table Vertical table Crosstab table Form table

To change the default template of a report select Templates tab, then drag-and-drop a templete you want to use on a report To create a chart you can simply select the Template tab and drag-and-drop a chart template you want to use on a report. Then you place objects on the chart by draging-and-dropping dimensions as axes and measures as lines. If you want to create a chart based on a table report you can simply right-click on this report and select Turn to. Choose a chart template and click OK button to finish. You can create sections in a report. Report sections divide data presented in a report into many reports divided by a dimension. To create a section drop a dimension object above a report. You can also change the color of the report, size or style of a font, size of cells etc. Most of this options are similar to MS Office and are avaible on top menu or the Properties tab.

Formulas and variables


To make calculations on your report you can use stadard calculation funcion like sum, count, average, minimum, maximum. If you need more complex calculations you can use formula language to build them. You can also save formulas as variables.

Variables gives you and other users an easy way to use your custom calucations in the future.

Custom calculations
To make a custom calculation you need to:

y y y y

Select a cell or column where you want to place a formula or calculation Click Show/Hide Formula Toolbar button from the top menu Type in formula or if you want to create more complex calculations select Formula Editor. Formula Editor window will appear. Create a formula using functions, objects, operators by double click on them or dragging-anddropping them to Formula pane. When you select a funcion, you see tips and examples of a funcion in a descrition pane.

y y

Click Validate button to check the correctness of a formula Select OK

Creating a variable
To create a variable you need to:

y y y

Select a cell or column that contains calculation or formula you want to save Select Create variable button from Formula Toolbar. Create Vormula window will appear. Type in name of the formula

y y

Select the type of a new objects in Qualification list. Click OK. New object appears in Data pane. It is also possible to edit and duplicate existing variable. To edit a variable, right click on it than select Edit variable. Variable Editor appers, you can change name, qualification and the formula of a variable. To commit changes select OK. To duplicate a variable, right-click on the variable and select Duplicate. A duplicated variable

appears with a default name. You can change the name of a duplicated variable using Variable Editor.

Multiple data sources


You can create a report based on multiple sources or queries. Defining more than one query can be necessary when data, you want to put one the report is avaible in more than one universe (that can be caused by several data sources one universe is based on one data source) or when you want to build many differrent queries based on one universe. Using multiple data source gives you possibility to present data form different queries on the same report.

Adding a new query


To add new query you need to:

Select Add Query button in the top menu or right-click on query tab in the bottom left, than select Add Query. Universe window will appear. Universe window shows the list of universes grouped in universes that are already in use and avaible universes.

Select used universe if you want to add a new query to the same universe or select new, from the avaible universe list if you want to create a query to a different universe.

Build query difining objects and filters you want to use similar to previous query. When additional query is finishen selecy Run Query button, that will bring you to Edit report view.

Working with multiple queries


You can switch Queries selecting the tab with a name of a query on the bottom of Edit Query view. To create a table report filled with data based on multiple queries or sources there must be at least one common dimension to make it possible.

In the Data tab of Edit Report view, when you select an object you can see that objects that are brought by different query are grayed out.

SAP BusinessObjects Crystal Reports tutorial


SAP BusinessObjects Crystal Reports is a thick client report design tool, fully integrated with the SAP BusinessObjects Enterprise platform. Crystal Reports is an application which allows users to create flexible, pixel-perfect, feature-rich reports and integrate them easily with software developer kits (SDKs) into web and Windows applications using Java, .NET, and COM applications. When used within the SAP BusinessObjects Enterprise business intelligence platform, Crystal reports can be published to the web, viewed through the InfoView portal and managed and deployed in a web-based environment (within Windows, Unix, and Linux platforms). The reports are developed and published using a Crystal Report Designer application. Crystal Reports Server is an enterprise reporting solution that helps create, manage, and deliver reports over the web or embedded them in enterprise applications using SDK. Crystal Reports Server is designed and supplied to support departmental or workgroup requirements and is ideal for mid-sized and small companies. From the SAP Business Objects Enterprise platform standpoint, the Crystal Reports Server is a smaller alternative and is a lot less powerful in terms of a web portal (InfoView), administration and customization.

Crystal Report designer


The Crystal Reports Designer is an application which provides graphical interface to develop reports and provides flexibility and control during the creation of highly formatted, feature-rich reports. It includes a complete and rich set of layout and design controls to give the created reports a professional, pixel-perfect appearance without any custom coding, streamline the number of reports by using parameters and organize data in a logical manner using sections, groups and sorting. The outlook of the ad-hoc chart and map reports is supported by the intelligent charting feature that automatically recommends the best chart type for a given set of data.

For novice users, Crystal Reports includes an intuitive report design expert and a report creation wizard. For more advanced users, Crystal Reports lets control over most features, including formulas, conditional formatting and object positioning so the reports can be highly customized. Crystal Reports provides a set of over 35 data connection drivers to any relational, OLAP, XML or inmemory data source. CR provides native, ODBC, OLE DB or JDBC connectivity to databases, files, logs, enterprise applications, program elements or BusinessObjects Enterprise universes. The underlying SQL for every report developed in Crystal Reports can be customized which provides a complete control over how the data is queried. It is also easy to link data from multiple sources and in multiple languages within the same report. Crystal Reports report designer is composed of the Toolbar, Design tab and Field Explorer and Report Explorer Toolbar is divided into Standard, Formatting, Insert, Experts, Navigation tabs. bars.

Design tab provides environment for designing a report. Data you want to place on the report is represented by fields that you put in sections of the report. In the Design tab you can also do formatting or specify Report Header Page Header Details Report Footer Page Footer sorting order and grouping. Design tab basic sections:

y y y y y

Click here to find more about Sections Field Explorer is used to insert, modify or delete fields from the report. Database Fields folder consist a list of database tables and columns you can retrieve data from. If you're not connected to the database, right-click on Database Fields folder and select Database Expert. In the Database Expert dialog box select connection to the database or create new one. Select tables you want to use and click OK. Expand the Database Fields folder to see all available objects. To put field on the report drag it and drop field frame

on the report or select a field and use Insert Field button from the Field Explorer toolbar.

You can switch from the Field Explorer tab to Report Explorer tab to manage sections of the report. To add Special Fields like page number, print date or comments expand Special Fields folder in the Field Expert tab. From the list of special fields choose the one you want to use and drag-and-drop it in the section where you want to place it.

To insert Text object select Insert Text Object from the Toolbar. Draw the text object frame in the section you want to place it. Fill the frame with a text. You can also put a picture on the report. To do this click Insert picture button from the Toolbar, browse for picture you want to use and open it. Place the picture frame in a particular section. To preview the report before printing it, use Print Preview on the Toolbar. Report preview will be generated. You can also preview report in HTML format. To do this, click HTML Preview button.

Report Creation Wizard


The easiest way to build a report is to use a Report Creation wizard. There are four types of wizards Standard Report Wizard, Cross-Tab Report Wizard, Mailing Label Report Wizard and OLAP Cube Report Wizard.

Standard Report Wizard is the most common type of a wizard. It helps you link to the database tables, add fields, make groups, totals and specify sorting criteria. Cross-Tab Report Wizard gives you possibility to create report, where data is presented as a cross-tab object. Mailing Label Report Creation Wizard helps you create and print report in any mailing label size. OLAP Cube Report Wizard lets you design report based on OLAP data sources. To create a report using Standard Creation Wizard you need to:

y y y y y y y y y y y

In the Start page click Standard Report Wizard to open wizard dialog box Choose a connection to the database tables or create new one. Connections that have been used before are listed in History folder. Choose tables you want to use and move them to the Selected Tables section then click OK. Check the links between tables and click OK if tables are linked properly. This screen will be shown only if tables you choose are linked. In the Data screen select fields you want to put on a report by moving them into the Fields to display section. Grouping screen let's you set groups by selecting particular fields that will make groups. You can also set a display order of the groups to ascending or descending. In the Summaries screen select fields that you want to be summarized. The summary of a field will be shown in the bottom of the report. You can set additional group sorting based on group summaries totals in Group Sorting screen. In the chart screen select weather you want to put a chart on the report or not. You can also choose a type of a chart. Record selection screen gives you possibility to set filters on the report. Select fields you want to set filter on and move it to the Filter fields section. Select an operator and a value of a filter. The last step is selecting a template of the report. Select a template that suits your needs and click Finish to preview the report.

Creating reports using Cross-Tab Report Wizard, Mailing Label Report Wizard and OLAP Cube Report Wizard works in the similiar way and is pretty intuitive. However, it needs to be stated clearly that it is impossible to create an advanced report with any of the Crystal Reports wizards

Sections
Sections are the design areas which you use to build your report. Crystal Reports by default provides five main sections:

y y y y y

Report Header fields placed in this section are printed once, at the beginning of the report Page Header - fields placed in this section are printed at the beginning of each new page Details fields in this section are printed with each new record Report Footer - fields placed in this section are printed once, at the end of the report Page Footer - fields placed in this section are printed at the bottom of each new page

More sections will appear if you add groups or simply insert new one.

Working with sections


To insert a new section you need to:

y y

Click Section Expert button in the top menu. Section Expert contains a list of all sections in the report Select section and click insert. New section will appear after the section you have selected. If there are more than one section of a kind, there appear with lettered a, b, c and so on

To delete a section:

y y y

Open Section expert Select section you want to delete Click Delete. Note that you can only delete section if there are lettered. In mean that you cannot delete sections originally provided by Crystal Reports

To move a section (change sections' order):

y y y

Open Section Expert Select section you want to move Use up and down arrows to change order of the sections. Although the alphabetic order of sections is the same, their data and display order is changed

To merge sections you need to:

y y y y

Open Section Expert Move sections so the sections you want to merge fallow each other Select the top section Click merge. Section will be merged with section that is next on the list

To split sections:

y y

Click on the on the boundary of the section you want to split. Horizontal line that splits section will appear Drag-and-drop it to the place where you want to split section

Sorting and grouping


When you put a field on your report, the records appear in order as they are inserted in the database. Sorting data means placing it in a custom order to help you evaluate data and find information. There are two basic sorting directions:

y y

Ascending smallest to largest: A to Z, 1 to 9 Descending largest to smallest: Z to A, 9 to 1

To sort data you need to:

y y y y y

Select Report tab in the top menu and click Record Sort Expert. Choose fields you want to sort and move them to the Sort Fields section using >> and << buttons. Choose sort order of the field. If you have selected more that one field you can set a hierarchy of sorting using up and down arrows over the Sort Field section. Click OK to commit.

Grouping data means collecting similar records into meaningful groups. For example you can create a group that consists names of the customers that live in the same country. To group the data you need to:

y y

Select Insert tab in the top menu, then click Group... In the Insert group dialog box select a field you want to group and set a sorting order for this group to ascending, descending, specified order or original order. You can also use formula workshop to specify your own sorting order.

Click OK.

When you create groups you can see that Group header and Group footer sections appear in the design view of the report. There is also a label with a name of the group in the Group header section.

Chart expert
You cannot place chart in every design area of a report. You can place them only in headers and footers of the page or report. You can also place them in group headers and footers if you created groups. To create a chart you can select Insert tab, click Chart, than place chart frame on a particular section or right-click on section you want to place the chart and select Insert Chart. You cane also use Insert chart button in the top menu. Every of this actions will open Chart expert dialog box.

If your chart is already placed on the report you can right-click on it and select Chart Expert. When you have Chart Expert dialog box opened you can see following tabs: Type, Data, Axes, Options, Color Highlight and Text. In the Type tab you can choose one of many different chart types. In some types of charts you can also choose vertical or horizontal alignment of the bars and weather to use depth effect or not. Important chart expert features:

Data tab gives you possibility to set the advanced options of a chart and choose layout if the chart is based on a specific data source like cross-tab or olap.

y y y

In the Axes tab you customize some options like range of the axes, gridlines or number of divisions. In the Options tab you can set colors and size of the bars or type of background. You can also choose weather to show legend or not and set its alignment. Color Highlight tab gives you possibility to mark fields that fulfit you condition. To create new condition press New button. In the Item editor section choose a value and an operator of a condition. Data that fulfit your condition will be displayed in selected color.

Text tab lets you type titles and subtitles and specify style, size and type of a font.

Formulas
In many cases you will need to insert a data to the report that is not represented by any table column in the database. To do this you will need to create a formula. There are several different types of formulas:

y y y y y y
To

Report formulas - additional fields on the report, for example calculations. Conditional formatting formulas - they change the appearance of report fields. Selection formulas - they limit the records displayed on the report. Search formulas - they help you find data in your report. Running total condition formulas - help you create running totals. Alerting formulas - help you specify alerts and messages. create many different types of formulas you can use the Formula Workshop.

To define new Report formula you need to:

y y y

Click Formula Workshop button from the Toolbar. In the Formula Workshop window select New from the top menu. Type the name of a formula you want to create and click Use Editor button. New sections of Formula Workshop appear. The window on the left show available report formulas and current connections. The window in the middle consist functions grouped in folders, the right one consist different types of operators.

y y y y

Type in the formula syntax or use functions and operators to build it. CTR+space will show the list of available functions and operators. Click Check button to verify the formula and correct errors if there are any. Click Save and close . The formulas you have created are listed in the Formula Fields folder, in the Field Explorer tab. To put formula field on the report drag-and-drop formula frame into the section you want to place it. You can see there's a formula name on the report preceded with the "@" sign.

Real-life examples of using formulas in Crystal

Subreports
Subreport is a report inserted as an object to another report called primary report. Subreports can be used for combining unrelated reports into a single report or to present different views of the same data in one report. There are two types of a subreports:

y y

Unlinked subreport - their data is not combined with the data of the primary report Linked subreports - data is this report is matched up with data in primary report

To insert a subreport into another report you need to:

y y

Click Insert tab, than select Subreport. You can also use Insert Subreport button from the top toolbar. In the Insert Subreport dialog box select Choose an existing report radio button to insert existing report or select Create a subreport with a Report Wizard to create new one. Check On-demand subreport (similar to a hyperlink) if you want to have the ability to refresh data on the subreport.

y y

If you selected "Choose an existing report", browse and open a file you want to insert. If you have selected "Create a subreport with a Report Wizard" type in the name of a new report and click Report wizard button to create it. The process of creating subreport with a Report Wizard is similar as creating a standard report.

Put the object frame in the section you want to insert subreport in by clicking once. You can see there is a label of the subreport on the primary report.

If you want to preview whole subreport that is a part of a primary report you need to:

y y

Click on the tab that is labeled subreport's name Select View tab and click Print Preview or simply click Print Preview button on the toolbar. A preview of the report will be generated

Anda mungkin juga menyukai