In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how VB.NET uses Crystal report controls. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Crystal Reporter (Crystal report)
As an excellent report software, Crystal report is the most common scheme in practical application. In this section, we mainly introduce the customization and display of crystal report and the realization of printing function. The first step is to distinguish between the Crystal report plug-in and the VB.NET Crystal report control. The former is mainly used to create report templates, while the latter is mainly used to display and print reports in the program. The division of labor between the two determines the difference of functions in their programs. The Crystal report plug-in can be downloaded from Seagate's official website.
The use of 1.VB.NET Crystal report Control Program
Select the report designer option of the add-in menu, and VB executes the Crystal report Pro plug-in application. By selecting the "New report" icon in Crystal report Pro, you can choose 8 standard templates and a custom template to start the report project.
The use of the entire Crystal report is very similar to the use of Data Report in the * * section. First of all, you need to select a data source (that is, a database) for the report, and then you can add, delete, modify fields, and group records in the report, and you can use Crystal reports to create many custom-styled reports. Because the crystal report plug-in itself is a powerful report design software, it can not be explained one by one here. If you are interested, you can refer to the help documentation that comes with the program.
Background knowledge of 2.VB.NET Crystal report Control
Crystal report Pro also provides a report generation module that can connect to and access VB applications. VB programmers can add complex report generation and output functions to the application without spending a lot of time writing their own code.
Crystal report engine is a dynamic link library, which enables applications to access and has the same powerful report output function as Crystal report. The application accesses the engine through the Crystal report ActiveX control. When recompiling, the application is linked to the report engine to add the function of generating reports to the application.
When the program uses the Crystal report ActiveX control, you can establish a connection between the application and the Crystal report by setting the Crystal object properties at redesign time or changing the object properties at run time. You can specify through the properties of the Crystal control:
The name of the output report that ◆ responds to an event in the application.
The target location of the ◆ report (preview window, disk file, email, etc.).
The number of copies ◆ wants to print (if the report is submitted to the printer).
Information about the ◆ output file.
The size and location information of the ◆ preview window if the report is displayed in the preview window.
◆ selects formula information if the record is restricted in the report.
◆ sort information.
Other related properties of ◆.
It is important to note here that the Crystal control must be used in a report created by Crystal report Pro, and before attempting to reference it in a VB application, you must first create a report.
The use of 3.VB.NET Crystal report Control
Now that you understand the functionality of the VB.NET Crystal report control, you can use it. First of all, select "Crystal report Control" from the "parts" option of "Project", then the VB.NET Crystal report Control will be added to the VB toolbox.
Note that the most important property for the VB.NET Crystal report control is ReportFileName, which is set to the file path of the report template that has been customized previously in Crystal report Pro. Then you only need to call the control's PrintReport method to display the report.
Compared with Data Report control, the function of VB.NET crystal report control is more perfect, report preview, printing, editing and other functions are very perfect, so in the actual report application design, the use of crystal report is relatively more. However, the VB.NET Crystal report control also has its limitations, that is, it cannot create custom windows at runtime. You can use the data-bound properties of the control to create a data-bound report, but the format of the report itself is handled internally by the VB.NET Crystal report control. In general, the VB.NET Crystal report control does not provide field-level access to the report in the program. This defect can be remedied by designing enough reports.
Thank you for reading! This is the end of this article on "how to use Crystal report Control in VB.NET". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.