Sei sulla pagina 1di 23

Crystal Report Hand Book

Crystal Report Basics

Author: Abani Kumar Mahapatra Created Date: July 02, 2008 Reviewed By: Vishal Thakur Review Date: July 02, 2008

For Patni Internal Use Only

Page 1 of 23

Crystal Report Hand Book

TABLE OF CONTENT

Crystal Report Basics...........................................................................................................1 1.Overview:..........................................................................................................................3 2.Database Connection:.......................................................................................................3 3.Supported Data sources:...................................................................................................4 4.Report Sections:..............................................................................................................10 5.Types of Reports:............................................................................................................13 6.Alerts:..............................................................................................................................14 7.Sub reports:.....................................................................................................................16 8.Hyper link and drill down report:...................................................................................18 9.Templates:.......................................................................................................................21 10.Export: ..........................................................................................................................22 11.Bibliography:................................................................................................................23

For Patni Internal Use Only

Page 2 of 23

Crystal Report Hand Book

1. Overview:
Crystal report is a reporting tool provided by Business Object. It provides different functionality for generation of a report. This includes database connection, displaying the data in the proper sections, formatting the data present in the sections, displaying the data / header label depending on the record set values or user input parameter value in the report run time. Tools are designed to work with the database to help you analyze and interpret important information. This document will provide the basic illustration of how the reports are generated with the help of Crystal Report XI tool; from CA Clarity point of view. Users install Crystal Reports on a computer and use it to select specific rows and columns from a table of compatible data. Users can then arrange the data on the report in the format needed. Once the report layout is complete it is saved as a file with the extension RPT. A report can be rerun anytime by reopening the RPT file and 'refreshing' the data. If the source data has been updated then the refreshed report will reflect those updates. The report can then be previewed on the screen, printed onto paper or exported to one of several different file formats such as PDF, Excel, and text, CSV or other.

2. Database Connection:
It supports both MS SQLServer and Oracle for the data source creation. It also supports to extract data from other than the above data sources. This is mentioned in the below screenshots. Select Database Expert from the Database menu

For Patni Internal Use Only

Page 3 of 23

Crystal Report Hand Book

Click on Create New Connection folder. This will look like as following screenshot. Then go to the OLE DB (ADO) folder.

3. Supported Data sources:


The below screenshot provides the list of supported data sources in Crystal Report. Accessible data sources include: Databases such as Sybase, IBM DB2, Ingres, Microsoft Access, Microsoft SQL Server, MySQL, Interbase and Oracle Btrieve Spreadsheets such as Microsoft Excel Text files XML files

For Patni Internal Use Only

Page 4 of 23

Crystal Report Hand Book


Groupware applications such as Lotus Notes, Microsoft Exchange and Novell GroupWise Any other data source accessible through a web service, ODBC, JDBC or OLAP.

Different Types of Data sources supported by Crystal Report XI.

Select the highlighted link as mentioned below for the Oracle /SQL Server connection.

For Patni Internal Use Only

Page 5 of 23

Crystal Report Hand Book

For Oracle Connection

For SQL Server Connection

For Patni Internal Use Only

Page 6 of 23

Crystal Report Hand Book

Then press the Next button and followed by the Finish button. After clicking the Finish button, it gives the list of available schemas. From the schemas we can select the required tables or we can write the SQL query.

For Patni Internal Use Only

Page 7 of 23

Crystal Report Hand Book

The links tab shows the joins between the selected tables and commands. Also we can create of our own as per the requirement.

For Patni Internal Use Only

Page 8 of 23

Crystal Report Hand Book

Now the fields from the table or from the complex select query would be available in the field explorer. From the field explorer we can drag and drop the fields to the relevant report section.

For Patni Internal Use Only

Page 9 of 23

Crystal Report Hand Book

4. Report Sections:
The different report tools provide various ways of handling the cited report sections. Any report must include the following sections in the body of the report. The way Crystal Report handles the report sections and its classifications are as follows. Report sections: Headers Headers are also of 2 types. 1) Report Header 2) Page Header Group Section Content Section Footer Section Footers are also of 2 types. 1) Report Footer 2) Page Footer Report Headers/Footers, Group sections Headers/ Footers and Content sections could be more than one in a report according to the requirement.

For Patni Internal Use Only

Page 10 of 23

Crystal Report Hand Book

Report Sections

Headers

Group Section (Optional) Group Section Headers(GH)

Content Section

Footer

Report Headers (RH)

Page Headers

(PH)

Group Section Footer(GF)

Report Footer (RF)

Page Footer (PF)

(Fig: 1 Shows the Report Section Structure)

Order of execution of the report sections during the running the report:

Report Header (RH1)

Report Header (RH2)

Page Headers (PH1)

Group Section (GH1)

Group Section (RF1)

Page Footer (PF)

Report Footer (RF)

Content Section (C1)

(Fig: 2 Shows the Report Section Execution Order)

Content Section (C2)

For Patni Internal Use Only

Page 11 of 23

Crystal Report Hand Book

(Fig 3: Shows the Crystal Report Sections)

For Patni Internal Use Only

Page 12 of 23

Crystal Report Hand Book

(Fig 4: Sequence of Processes Executed During the running of CR)

5. Types of Reports:
Crystal Report supports 5 different types of reports. The available wizards will help to create the reports. We need to just enter the proper values for the configuration of the report.

For Patni Internal Use Only

Page 13 of 23

Crystal Report Hand Book Namely: 1. Standard Reports its page set up and other general properties are predefined as per the standard. 2. Blank Reports - Helps to develop the report from scratch. 3. Cross Tab Reports It leads to configure the report in Matrix fashion. 4. Mailing Label Reports It helps to create different data in the same page. 5. OLAP Cube Reports - NA

6. Alerts:
Alerts in Crystal Report helps to display customized message during the runtime. It can be used to trigger some event or function in the run time.

For Patni Internal Use Only

Page 14 of 23

Crystal Report Hand Book

(Fig 5: Formula workshop for creating different conditions in different levels)

For Patni Internal Use Only

Page 15 of 23

Crystal Report Hand Book

7. Sub reports:
It can be created in the Crystal Report which Actuate does not support. By using this feature we can call another report inside a report. Before going ahead to insert a sub report, we have to ensure that second report should be ready to act as a sub report. We can also filter the data displayed on the second report content by providing the link as mentioned in the screenshot below.

For Patni Internal Use Only

Page 16 of 23

Crystal Report Hand Book

(Fig 6: Links for Sub report)

For Patni Internal Use Only

Page 17 of 23

Crystal Report Hand Book

8. Hyper link and drill down report:


Inserting a hyperlink in Crystal Report is very easy as follows.

Hyper linking can be done to link the following mentioned things. Website address An Email address Any file Another crystal report This feature adds the capability of creating drilldown reports in Crystal. This can be done only when the DHTML viewer is configured.

By clicking the hyperlink option the following window will open up to enter the details about the linking properties.

For Patni Internal Use Only

Page 18 of 23

Crystal Report Hand Book

For Patni Internal Use Only

Page 19 of 23

Crystal Report Hand Book

Enter the target types like web site address, file name, email addess etc.

Click here to go to formula workshop to do the conditional formatting of the linking properties.

For Patni Internal Use Only

Page 20 of 23

Crystal Report Hand Book

9. Templates:
We can use different existing report templates to design the reports. In addition to this new custom templates can be created.

For Patni Internal Use Only

Page 21 of 23

Crystal Report Hand Book

This will lead to select custom templates. These buttons help us to play with the templates.

10.

Export:

For Patni Internal Use Only

Page 22 of 23

Crystal Report Hand Book

Above mentioned listed formats are supported by the crystal report export wizard.

11. Bibliography:
Website: http://support.businessobjects.com/documentation/

For Patni Internal Use Only

Page 23 of 23

Potrebbero piacerti anche