Running a report
Applying one of the following two TfrxReport
methods starts a report:
procedure ShowReport(ClearLastReport: Boolean = True);
Starts a report and displays the result in the preview window. If the “ClearLastReport” parameter is equal to “False,” then the report will be added to the previously constructed one, otherwise the previously constructed report will be cleared (by default).
function PrepareReport(ClearLastReport: Boolean = True): Boolean;
Starts a report, without opening the preview window. The parameter assignment is the same as in the “ShowReport” method. If a report was constructed successfully, it returns “True.”
In most cases, it is more convenient to use the first method. It displays the preview window right away, while a report continues to be constructed.
The “ClearLastReport” parameter is convenient to use in case when it is necessary to add another report to the previously constructed one (such technique is used for batch report printing).
Example:
frxReport1.ShowReport;