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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12.2.4 Printing a bounded report with parameters based on a data fileTo print a bounded report with parameters based on a data file, you must:1. Configure the destination of the print:•In WinDev: use iPreview (print preview, print in an HTML file, …).•In WebDev: use iDestination (print in an HTML file, …).• In WinDev Mobile: use iConfigure or iParameter. These functions open a dialog box allowing the userto select the default printer.2. Specify the following parameters with iPrintReport:• the name of the report to print.• the value of the lower bound for the report.• the value of the upper bound for the report.• the parameters expected by the report (in the order specified in the report).WinDev example:The "RPT_ParamReport" report corresponds to a mailshot sent to the customers whosename starts with the letter "D" or with the letter "E".The lower bound corresponds to "D" and the upper bound to "E".This report expects in parameter:• the text of this mailshot entered in the "EDT_MailshotText" edit control.• the date for sending this mailshot entered in the "EDT_SendDate" edit control.This report is printed during a click on the "Print" button. The "RPT_ParamReport" report isbased on the "Customer" file.In this example, the click code of the "Print" button is as follows:// Open the preview windowiPreview()// Print the report while passing bounds// and parametersiPrintReport(RPT_ParamReport, "D","E", ...EDT_MailshotText, EDT_SendDate)WinDev Mobile example:The "RPT_ParamReport" report corresponds to an invoice sent to the customers whosename starts with the letter "D" or with the letter "E".The lower bound corresponds to "D" and the upper bound to "E".This report expects in parameter the delivery date entered in the "EDT_DelDate" edit control.This report is printed during a click on the "Print" button. The "RPT_ParamReport" report isbased on the "Customer" file.In this example, the click code of the "Print" button is as follows:// Select the printeriConfigure()// Print the report while passing bounds and parametersiPrintReport(RPT_ParamReport, "D", "E", EDT_DelDate)118Part 1: Report editor

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

Saved successfully!

Ooh no, something went wrong!