For general report design, such as rdlc and Crystal Reports, Visual Studio must be installed to design reports through the report design interface provided by. NET developers are very convenient, but for non-developers, it is a bit costly to install a 4G Vs and require a license. This article provides another method to design reports without using.
With the free report designer (Green EXE Executable File) provided by activereports, we can also design reports. The following describes how to design reports:
Who should read this article?
- Report designer
- Product Manager
- Demand Analyst
Necessary Environment
- The. NET Framework 4.0 environment is installed.
- MS office access 2007 and later
1st minutes: understanding the report designer
Double-click grapecity.activereports.samples.enduserdesigner.exe. The following report design page is displayed.
The overall style and Visual Studio are very convenient to use, especially familiar with the visual stuido interface.
This article uses regional reports.
14 Report controls are provided in regional reports. This article uses 6 controls: (for differences between regional reports and page reports, see)
- Label: Labels are used to display descriptive text, which helps you describe the data displayed in reports.
- Textbox: Text box is a basic report control that allows you to directly display and edit unformatted text.
- Picture: This control is used to display image files in reports and control attributes such as image size.
- Line: Lines draw borders visually or highlight specific areas in the report.
- Reportinfo: The reportinfo control allows you to quickly display page numbers, pages, report dates, and other information.
- Barcode: A bar code is a graphical identifier used to express a set of information by arranging black bars and white spaces with varying widths according to certain encoding rules.
2nd: configure the data source and Layout
The following figure shows the data ing description of the regional report, in which the detaing relationship is: A record of the detail information of the corresponding report in the database.
After learning about the data ing relationship, we start to design reports. First, we configure the data source. Here we provide an access relational database (at the bottom of this Article ).
ClickDatabase icon
You can open the following data source view:
After configuring the data source, right-click cece1 and choose add dataset. You can use an SQL statement to obtain a DataSet object similar to datatable.
The complete SQL statement used in this blog is as follows. You can download the data source from this path (after downloading the attachment, decompress the file and obtainNwind_chs_small.mdbFile)
Select Product. Product ID, product. Product Name, product. Supplier ID, product. Category ID, product. unit quantity, product. unit price, product. Inventory, product. Order Quantity,
Product. reorder quantity, product. Abort, product. Picture, product. Product description, category. category name, category. description as Category Description, category. image as category image,
Supplier. company name as supplier, supplier. Contact Name, supplier. City, supplier. Address
From (supplier inner join
Product on supplier. Supplier id = product. Supplier ID) Inner join
Category on product. Category id = category. Category ID)
Order by supplier. Supplier ID, product. Category ID DESC
Since then, the data source configuration has been completed, and the introduction to report design has been completed. The following describes the requirements for report design.
3rd minutes: report design requirements
- We want the report to display results similar to the following layout. The report header, report data details, and the end of the report, that is, the overall style is similar to that of the rdlc report.
- You can also display the QR code, Image Display format, report generation time, report page, and other information.
- Considering the lowest cost of system migration in the future, we hope that we can reuse it at the lowest cost in winform, WPF, ASP. NET, HTML5, and other platforms-one-time well-designed reports.
4th minutes: drag the report Control Design Report
Multiple designer buttons are added at the bottom of the report designer. These buttons can be used to quickly access the layout Wizard to facilitate the design of the report template.
Snap lines ):Drag a widget on the report design page. When the widget is aligned with other widgets (or the boundary of a report area, an Automatic Alignment Line will appear between the dragged control and the control aligned with it (or the border of a report area), making it easier for users to freely layout the control.
Snap to grid ):On the report design page, drag a control to automatically align it with the nearest grid line. This function can be enabled or disabled based on settings.
Excel-like auto scrolling ):Drag a widget on the report design interface. When the drag area is beyond the current display range of the design interface, the design interface automatically moves in the direction you drag until the edge of the report design interface.
Pan mode ):When you switch to the translation mode, a hand-shaped cursor is displayed. You can drag the design page of the report by pressing the left mouse button.
Automatic Dimension lines ):When you drag a widget on the report design page and change the widget size, the widget edge will automatically display a dimension line. You can clearly know the distance between the widget and the report boundary through the dimension line.
Report control dialogs dialog box ):You can easily set the attributes of a report control.
By default, the area report layout displays three areas: Header, details, and footer. You can add or delete headers and footers, report headers, and report tails. You can also add 32-level group headers and footers (right-click a report and selectInsertYou can insert the report header, report end, and group header, or group end .). Drag controls to these areas to display report data. The report layout is saved in RPX format.
Drag fields from the data fields to the report, such as the supplier name, contact, address, and city.
For line, barcode, and picture, you need to drag in from the toolbar on the left.
The barcode and picture must be modified in the Properties dialog box.Data---DatafieldField.
5th minutes: preview results, print and export
Preview and view the report results as follows:
Export: In the design toolFile---Export-- Multiple file formats (HTML, PDF, Excel, etc.) can be exported ).
PrintFunction. You can use the print button on the toolbar to print the data directly.
How do you think about the impulse to design reports?
Green Report design tool (which can be decompressed, including C # source code)
Database (after downloading the attachment, decompress the file and obtainNwind_chs_small.mdbFile)
Online Reference
In addition, the source code is provided for this Green Report designer, which can be customized with your friends, such as adding company logos and other Personalized Requirements. (Install activereports installation authorization for source code compilation)
This article uses the C #. Net green version. If you need the source code of the VB. NET green designer, please leave a message and send it to you separately.