ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Report editor / Programming a report
  • Overview
  • How to?
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
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.
Sequence of reports
Windows Remark: You also have the ability to add into the sequence:
  • a Word Processing document.
  • a PDF document.
  • an XLS or XLSX document.
  • a diagramdocument.
How to?
To sequence the reports through programming:
  1. 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.
    • Windows a Word Processing document to the sequence, use iSequencingAddDoc. This function is used to specify the Word Processing document o print.
    • Windows a PDF document to the sequence, use iSequencingAddPDF. This function is used to specify the PDF document to print.
    • Windows an XLS or XLSX document to the sequence, use iSequencingAddXLS. This function is used to specify the XLS or XLSX document to print.
    • Windows a diagram (WDDiag file) to the sequence, use iSequencingAddDiagram. This function is used to specify the diagram document to print.
  2. 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:
WD Reports 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, ...)
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help