QuickReports 3.5 has much better help that 3.0 which ships with Delphi 5. However, there are still too many references to the web page which, as far as I can tell, contains no additional help.
The basic problem using QuickReports the first time is that all the bands are turned off. And no, the help does not tell you this.
Use QRDBText to display both text and memo data.
Basic Procedure
Double click QuickRep1 and be sure that the Detail band is checked. Place a QReport/QRDBText object in the Detail band.
Set
Table1.DatabaseName | DBDEMOS |
Table1.TableName | customer.db |
QuickRep1.DataSet | Table1 |
QRDBText1.DatafField | Company |
That should give you a basic report.
The next step is to display the report by running the form. At run time you can call QuickRep1.Preview or QuickRep1.Print to generate the report. This might be placed in the form's OnCreate event.
To see preview data, you MAY have to set Table1.Active to true. I think I've seen it both ways.
A Custom Preview Form
Place a QReport/QRPreview component. At run time, you want this component aligned to the client and in front of the other components. However, if you set those parameters now, you will not be able to design anything now. Therefore, leave the preview component small, on top, and out of the way. When the form starts, set QRPreview1.Align to alClient.
Place the following in QuickRep1.OnPreview
QRPreview1.QRPrinter := TQRPrinter(Sender);
The TQRPreview Properties, Methods and Events are not documented in either 3.0 or 3.5 help.
Author: Robert Clemenzi - clemenzi@cpcug.org