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.

• the code of the report is as follows:// Retrieves the parameters passed to the report and passes// the default parameters for the test of the reportPROCEDURE RPT_ParamReport(sText="Default", ...sDate=Today())WinDev Mobile example:The "RPT_ParamReport" report corresponds to an invoice. This report expects in parameterthe 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 parametersiPrintReport(RPT_ParamReport, EDT_DelDate)• the code of the report is as follows:// Retrieves the parameters passed to the report and passes// the default parameters for the test of the reportPROCEDURE RPT_ParamReport(sDate=Today())WebDev example:The "RPT_OrderReport" report is a report with parameters used to print the order of a customeridentified by a customer number.The "RPT_OrderReport" report is displayed in a PDF file. This PDF file is sent to the browserduring a click on the "Order" button.In this example:• the click code of the "Order" button is as follows:// Generates a unique file namePDFFile is string = fWebDir() + "\" + ..."Invoice_" + DateSys() + TimeSys() + ".pdf"// Configures the destination of the printiDestination(iPDF, PDFFile)// Generates the order formiPrintReport(RPT_OrderReport, CUSTOMER.CUUNIQUEKEY)// Sends the file to the browserFileDisplay(PDFFile, "application/pdf")• the code of the report is as follows:// Retrieves the parameters passed to the report and passes//the default parameters for the test of the reportPROCEDURE RPT_OrderReport(nCustomerID=450)Part 1: Report editor 117

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

Saved successfully!

Ooh no, something went wrong!