Create a new form, save it as FormReport pas, add a project, place a QuickRep control on it and drag it to a suitable position, and place the control as shown in the figure, in which two QRSysData controls are placed on the page header, the data attributes are set to Date and PageNumber respectively, and a QRLabel control is placed on the header, and the title is set as the title of the report; QRLabel control and QRDBText control are placed on the column header strip, and the first line of QRDBText indicates the following data contents. The second line of the qrdbtext control is the column name of the detailed data in the detailed band below, and the DataField property of the qrdbtext control is set to the characters displayed by the control. Put a QRDBText in the parts list to display the purchase list; Put a QRExpr control in the Summary Band to calculate the total amount, and set its Expression property to SUM(ADOQuery tax and price total), so that we have basically completed the production of the collection report. Right-click the report and select the preview menu item in the pop-up shortcut menu to view the print preview results directly.
Figure Layout of Report Control
The control property settings in the report are shown in the following table.
Tabular Report List of Other Controls in the Form
Lishi Xinzhi/Article/program/Delphi/20 13 1 1/24936