The data room charging system has the report function, which is a bit unfamiliar to us. Isn't it an accounting task? How is the data room Charging System Integrated? In fact, we have learned the report steps. After understanding the Code, it is not very difficult to report the report. Is it easy to climb the report!
The following are the report steps.
1. Install the grid ++ report designer (download and install it online)
2. download and install the control and reference it in components of VB project.
3. Create a template (import it to VB at that time)
4. Use the code in VB to link the report
Below are the steps for creating only a Report Template
1. After the report designer is installed, open the following interface:
2. Insert a report header: In the menu bar of the report designer, locate insert-Report header.
3. Insert a static box: Insert a static box to display the report title. Execute the "insert-static box" menu and drag and drop a rectangular area in the display area of the report header, double-click to change the title. For example
4. Define the detail Grid
1. Insert detail grid: insert-Detail grid. The newly inserted detail grid is displayed in the report layout window. For example
2. database connection string and query SQL: Select "database connection string and query SQL" on the toolbar of the detail grid to open the definition window. For example
As shown in the following figure:
5. Define a database connection string: Create a database connection string in the lower-left corner of the execution window...
Remember to tick the password that can be saved
Test passed
6. Create a field: Edit. query the SQL statements to generate a field. For example
Create a column: "edit-generate table columns Based on fields"
Change the title as shown in Figure
Adjust column width: move the cursor to the right boundary of the column for drag and drop
Change the display text of the table title: Follow the prompts in.
7. Define the page number displayed in the footer
1. Insert footer: Execute the "insert-footer" menu. The newly inserted footer is displayed in the report layout window.
2 insert a text box to display the printing time:
Insert integrated text box: Select "integrated text mining" in the toolbar of the Part Box, and drag and drop a rectangle on the left of the footer. A comprehensive text box has been inserted.
Set display content: Select the "text" line in the property editing window in the lower right corner and click "..." to open the text editing dialog box. Enter text in the edit box.
Select system variables in reference type
Select the current date and time in the system variable
Click OK to preview
The effect is not perfect. I have a smile. After that, we don't think it is too difficult. If there is a saying, don't know, don't know, or even don't know, in fact, this is the case after we know it. We should be good at standing on the shoulders of giants to learn the knowledge. Well, we can save it. As for how to make it interact with VB, please refer to the next blog.