|
|
|
|
|
In some cases, it may be necessary to print a series of reports, and view them at the same time in the report viewer. The composite reports can be used for this purpose when the sequence of reports is known in advance. If the sequence is not known in advance and if it must be programmed, the sequence of reports can be used through programming.
To sequence the reports through programming: - To add:
- a report to the sequence, use iSequencingAdd. This function must be used for each report that will be added to the sequence. This function is used to pass parameters to the report to print.
- a Word Processing document to the sequence, use iSequencingAddDoc. This function is used to specify the Word Processing document o print.
- a PDF document to the sequence, use iSequencingAddPDF. This function is used to specify the PDF document to print.
- an XLS or XLSX document to the sequence, use iSequencingAddXLS. This function is used to specify the XLS or XLSX document to print.
- a diagram (WDDiag file) to the sequence, use iSequencingAddDiagram. This function is used to specify the diagram document to print.
- To end the sequence and to start the print, use iSequencingPrint.
Example: MyDocument is Document = "c:\temp\generalconditions.docx" MySpreadsheet is string = "c:\temp\prices.xls" Â // Print in the report viewer iDestination(iViewer) Â // Add reports into the sequence iSequencingAdd(RPT_Report_Portrait) iSequencingAdd(RPT_Report_Landscape, 3) // Add the general conditions in document format iSequencingAddDoc(MyDocument) // Add prices in the format of an XLS worksheet iSequencingAddXLS(MySpreadsheet) iSequencingPrint()
Remarks: - The pages of the reports found in the sequence are numbered sequentially. The numbering can be modified by iPageNum.
- The reports found in the sequence can have different orientations (portrait and/or landscape).
- The reports are not run when running iSequencingAdd: only their name and parameters are stored.
These reports are actually run during the call to iSequencingPrint. Caution: If the reports found in the sequence are based on a query, the query must be initialized by iInitReportQuery in the initialization code of the report (and not before the call to iSequencingAdd).
Related Examples:
|
Training (WINDEV): WD Reports
[ + ] This example presents the different methods for creating a report: - prints based on different data sources (queries, variables, ...) - prints based on controls (Table, Spreadsheet, PVT, ...) - printing composite reports - specific prints (portrait/landscape, report with watermark, report with bar code, ...)
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|