Introduction
Crystal reports allow the user to generate reports by summarizing the data. It also allows the user to present data in a graphical format. The crystal reports enterprise reporting consists of,
- Powerful Report Design - Visual report designer allows user to design interactive reports, they can develop reports by using the .NET tools.
- Application Development Flexibility - Crystal Reports allow the user to generate HTML pages directly without wasting time on coding the pages. This facilitates the user in focusing on other application logic. Crystal Reports simplifies the process by separating the application development and report design task.
- Management and Delivery of Reports - Crystal Reports can be easily published on the web. The user can export reports to different file formats like PDF or DOC. The other features of Crystal Reports are printing and exporting report using minimal efforts, and high-quality reports.
Features
Crystal Reports incorporate various new features for easy report generation. Some of the features are,
- Customizable TemplatesThe user can design customized templates and use them while generating new reports. These templates can specify the formatting and design logic and the different data access operations to maintain consistency across multiple reports. This prevents the user from spending more time formatting every single report.
- Powerful Formula LanguageCrystareports provide over 160 built-in and user-defined functions and operators. This allows the user to control report formatting and complex logic. It also includes a call-stack to easily debug the generated errors.
- Crystal reports allow the user to display only relevant and required data by hiding unnecessary data.
- AlertingCrystal reports allow the user to highlight certain information to the user by generating messages.
- HyperlinksCrystal reports allow the user to create interactive reports by using hyperlinks. The reports are provided with hyperlinks that link to various web documents.
- Data AccessCrystal reports allow the user to easily access databases, files, application systems, and so on. Crystal reports have more than 35 data drivers that help in easy access of data from various data sources. It provides flexibility in connecting to the database by using query generation feature of Crystal Reports.
- Data Designing and FormattingCrystal reports provide various options for designing and formatting data. It provides various wizards to simplify the process of connecting to the database, sorting, or selecting data. It allows the user to provide graphical impact to the reports by using various maps and charts such as bar, pie, and so on.
Crystal Report Creation Wizard
Crystal Reports provides wizards for easy generation of reports. The report Wizard is used for creating and adding new reports to the existing report server. The steps for creating a report using the Report Wizard feature are as follows:
Step 1
From the file menu, click New and click Project
Step 2
In the Project Types list, select Business Intelligence Projects.
Step 3
In the Template list, select Report Server Project Wizard. The Welcome to the Report Wizard page appears.
Step 4
Click the Next Button.
Step 5
In Select the Data Source Page, click New Data Source and enter a data source name, select data type and the connection string. After building the connection click Next.
Step 6
In Design the Query page, type the query string and click Next.
Step 7
In the select the Report Type page, select Tabular or Matrix to arrange the reports in table format or matrix format respectively. Click Next.
Step 8
Depending on the choice made in the Select the Report Type page, the Design the Table page or Design the Matrix page is displayed. If the Design the Table page is displayed, click the appropriate field and click the Page, Group or Details button. If the Design the Matrix page is displayed, click the appropriate field and click the Page, Columns, Rows or Details button.
Step 9
From Choose the Tab Style or choose the Matrix Style page, select the appropriate option to apply styles to the reports, and click Next.
Step 10
In the Choose the Deployment Location Page, enter the report server and folder to publish the report
Step 11
In the Completing the Report Wizard, enter the name of the report, Click finish.
Customizing Reports
The Process of designing report in Crystal Reports can be optimized in many ways. Information can be summarized so that the user can navigate through the report quickly and also access the information within the reports. The benefits of creating user-driven reports are,
- Provide interactive control over the data existing in the report.
- Allows creation of reports as per user requirement to make the reports more useful.
Data Presentation
Crystal Reports allow the user to customize reports at runtime by accessing them. The user can customize the report in various ways. One of the methods is to group fields of a report at the runtime. The group field can be used to group data in the report as per the specified condition.
Consider a scenario where a report is generated in an application containing two fields (Employee Name), (Employee Age). A group is created in the report on the (Employee Name) field. The groups in the report can be changed by changing the selection in a combo box.
ReportViewer Controls
Report viewer controls are used for processing and displaying records that may contains data in tabular , aggregated or multidimensional form. Windows Forms provides the CrystalReportViewer control that allows the user to view and customize the reports. By using the properties, methods and events of CrystalReportViewer class, the appearance and functions of the reports can be customized.
Properties of CrystalReportViewer class
- DisplayStatusBar
Specifies or retrieves a value that indicates whether the status bar is visible. - DisplayToolBar
Specifies or retrieves a value that indicates whether the toolbar is visible. - ShowCloseButtton
Specifies or retrieves a value that indicates whether a button for closing a report page exists in CrystalReportViewer control’s toolbar. - ShowPageNavigateButtons
Specifies or retrieves a value that indicates whether a button for navigating in a page exists in CrystalReportViewer control’s toolbar. - ShowPrintButton
Specifies or retrieves a value that indicates whether the print button on the toolbar is visible. - ShowTextSearchButton
Specifies or retrieves whether the search button on the toolbar is visible. - ShowZoomButton
Specifies or retrieves whether the zoom button on the toolbar is visible. - ViewTimeSelectionFormula
Specifies or retrieves the selection formulae that are used to filter data in the report.
Methods of CrystalReportViewer class
- CloseView
Closes the view tab present in the control. - ShowGroupTree
Displays the group tree present in the control. - ShowNextPage
Displays the next page of the report. - ShowPreviousPage
- Displays the previous page of the report.
Events of CrystalReportViewer class
- Drill
Occurs when user goes deeper down in a report. - HandleException
Occurs when an exception occurs in the CrystalReportViewer control. - ViewZoom
Occurs when the zoom level of the control changes.