Basic Introduction to crystal report-1. Crystal Report Technology

Source: Internet
Author: User
Tags microsoft access database

In program development, it is often necessary to program combined computing, multi-level aggregation, chart creation, and conditional formatting. In this case, it is difficult to use common data controls, and Crystal Reports greatly simplify these tasks. It can be used to create beautiful charts, format text, and export reports to Word, Excel, PDF, HTML, and other formats.

6.1Crystal Report Technology

The English name of a crystal report is "Crystal Report". Its main function is to present data. To display data to users, you can write code to process the record set cyclically and output the data in the windwos application or web application. However, any operations beyond the basic formatting process will be complicated, for example, it is difficult to perform operations such as merge calculation, multi-level summary, chart creation, and condition and formatting.

6.1.1Introduction to Crystal Reports and data sources

The main purpose of a report is to print the data in the database and data sources of various types of files in the required format. We can see how important it is to set the report data source. Crystal Report for Visual Studio. NET supports various data sources widely used in the industry, allowing developers to smoothly display existing data sources on reports. Crystal Reports are connected to databases through database drivers. You can design reports based on the data in the following data sources:

L any database (rdo) using the ODBC driver ).

L any database (ADO) that uses the oledb provider ).

L Microsoft Access database (DAO ).

L microsoftexcel (DAO ).

L ADO. Net record set (Dataset ).

L ADO. Net record set (recordset ).

L CDO record set (recordset ).

L Dao net record set (recordset ).

L rdo record set (recordset ).

The Crystal Report report provides different data sources and data source access modes. The Data Access Modes of the Crystal Report can be divided into "pull model" and "PUSH model.

The so-called Extraction mode, that is, the driver will link to the database and extract data as needed. When the extraction mode is adopted, crystal report itself will automatically link to the database and execute the SQL command used to extract data. Developers do not need to write additional code. If no specific code is written in the running stage, the extraction mode is used.

On the contrary, if the push mode is used, developers must write code to link to the database, execute SQL commands to create a dataset or data record set, and pass the object to the report.

Developers have greater autonomy and control over data sources. For example, you can filter the data before handing the data volume to crystal report, or connect it to the public database of other objects in the application.

The function limitations of the report engine are quite limited. This feature enables developers to extract data records from different data sources and submit them to Crystal Report for printing.

Basically, if you use the extraction mode, you can only access ODBC, oledb, and access/Excel Data sources. However, if you use the push mode, you can use ADO. net, ADO, CDO, Dao, and rdo to access various data sources.

If the ADO. Net dataset is used in push-in mode in the Development Program, the report must use the Crystal Reports engine object model. The Crystal Reports engine object model allows developers to fully control the report structure and content during the running stage. Therefore, if the application needs to dynamically control the report content during the running stage, the object model will be the best choice. In Visual Studio. NET, The crystaldecisions. crystalreports. Engine namespace is used to support the report engine. When using the Crystal Reports engine object model in ASP. NET programs, you must reference the crystaldecisions. crystalreports. engine component. When you create a new Crystal Report report in a project or add an existing report to a project, the application automatically references the crystaldecisions. crystalreports. engine component. If you must manually reference a component, select the Add reference command from the project menu. In the Add reference dialog box that appears, double-click "crystaldecisions. crystalreports. engine component, as shown in Figure 6.1.

Figure 6.1 reference the "crystaldecisions. crystalreports. Engine" component

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.