13.07.2015 Views

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

WinDev code:// Open the preview windowiPreview()// Print the report while passing parametersiPrintReport(RPT_ParamReport, STC_MailshotText)WinDev Mobile code//Select the printeriConfigure()// Print the report while passing parametersiPrintReport(RPT_ParamReport, STC_MailshotText)WebDev code// Configures the destination of the printiDestination(iHTML,"RPT_ParamReport_" + ...GetIdentifier() + ".htm")// Prints the report while passing parametersiPrintReport(RPT_ParamReport, STC_MailshotText)// Sends the file to the browserFileDisplay("RPT_ParamReport_" + ...GetIdentifier() + ".htm")15.6.3 Running the test of a report with parametersTo run the test of a report with parameters from the report editor, a default value should be given to the parametersin the parameter declaration.For example, to run the test of the report found in the previous example, enter the following code in the "Opening" process of the "RPT_ParamReport" report:// Retrieve the parameter passed to the report and// pass a default parameter for the test of the reportPROCEDURE RPT_ParamReport(sText = "Default value")15.7 Handling a report in a WLanguage processTo handle a report in a WLanguage process, all you have to do is use the name of this report. This name canbe used:• in a WLanguage function,• with a WLanguage property,•by direct assignment.For example:// Print the "RPT_ParamReport" reportiPrintReport(RPT_ParamReport)// Modify the number of copies for the "RPT_Customer" reportRPT_Customer..NbCopy = 10Part 1: Report editor 141

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!