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.

Tip: The printers referenced on a Pocket PC are stored in the registry of the Pocket PC. To add a new printerconfiguration by programming, all you have to do is modify the registry of the Pocket PC. See the online helpfor more details.12.2 Report based on a data filePrinting a report based on a data file uses the basic principle described above. However, specific information(bounds, parameters, …) can be taken into account by a report based on a data file. In this case, the reportprint must be adapted. The following paragraphs present:• printing a report based on a data file (general case).• printing a bounded report based on a data file.• printing a report with parameters based on a data file.• printing a bounded report with parameters based on a data file.12.2.1 Printing a report based on a data fileTo print a report 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 name of the report to print with iPrintReport.WinDev and WinDev Mobile example:WinDev code:The "RPT_CustomerReport" report is based on the "Customer" file. This report is used toprint the characteristics of the customers.The "RPT_CustomerReport" report is printed during a click on the "Customer" button.In this example, the click code of the "Customer" button is as follows:// Open the preview windowiPreview()// Print the RPT_CustomerReport reportiPrintReport(RPT_CustomerReport)WinDev Mobile code:// Select the printeriConfigure()// Print the RPT_CustomerReport reportiPrintReport(RPT_CustomerReport)WebDev example:The "RPT_CustomerReport" report is based on the "Customer" file. This report is used toprint the characteristics of the customers.The "RPT_CustomerReport" report is displayed in a PDF file during a click on the "Customer"link. Then, the PDF file is displayed in the browser.114Part 1: Report editor

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

Saved successfully!

Ooh no, something went wrong!