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 Mobile code:// Select the printeriConfigure()// Print the RPT_gglEventReport reportiPrintReport(RPT_gglEventReport)WebDev example:The "RPT_gglEventReport" report is a report based on the MyEvents variable of gglEventtype. This report is used to print the list of events found in a Google calendar.The "RPT_gglEventReport" report is displayed in a PDF file during a click on the "Event" link.Then, the PDF file is displayed in the browser.In this example, the click code of the "Print" button is as follows:Notes:• ..<strong>Source</strong>Name used in the code of the report allows you to find out and modify the name of the datafile associated with the report.• The variable must have been created and initialized before printing the report.12.5.2 Printing a report with parameters based on a variableTo print a report with parameters based on a variable, you must:1. Initialize the value of the array variable used.2. Sort the array if necessary (with ArraySort for instance).3. Configure the print destination of the report:•In WinDev, with iPreview (print preview, print in an HTML file, …).•In WebDev, with iDestination (print in an HTML file, …).• In WinDev Mobile, with iConfigure or iParameter. These functions open a dialog box allowing the userto select the default printer.4. Specify the following parameters with iPrintReport:• the name of the report to print.• the parameters expected by the report (in the order specified in the report).WinDev and WinDev Mobile example:// Generates a unique file nameFileName is string = fWebDir() + "\" + ..."RPT_gglEventReport_" + DateSys() + ...TimeSys() + ".pdf"// Prints the report in a PDF fileiDestination(iPDF, FileName)// Prints the RPT_gglEventReport reportiPrintReport(RPT_gglEventReport)// Displays the report in PDF formatFileDisplay(FileName, "application/pdf")// Deletes the filefDelete(FileName)A window lists the organizers and their events. The "RPT_gglEventReport" report is printedduring a click on the "Print the organizer events" button. This report expects in parameterthe organizer for which the events must be listed.Part 1: Report editor 123

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

Saved successfully!

Ooh no, something went wrong!