ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Rich Text Area control
  • Example: Printing a report with parameters
  • Example: Printing a report in an HTML file
iPrintReport (Example)
Example: Printing a report with parameters
The following example is used to pass parameters to a report and to print this report.
// Print the report card for the student named Doe for the year 2000
iPrintReport(RPT_SchoolReportCard, "Doe", "2000")
// -- Report code
// Retrieve the parameters passed to the report and
// pass the default parameters for the report test
PROCEDURE RPT_SchoolReportCard(Name="Aaron", Year=1999)
Example: Printing a report in an HTML file
WEBDEV - Server codeAjax The following example is used to print a report in an HTML file.
// Print a report based on a query without parameter in an HTML file
// Generate a unique file name
MyReportFile is string = fWebDir() + "\" + "ReportQuery_" + DateSys() + TimeSys() + ".htm"
// Configure the destination of the print
iDestination(iHTML, MyReportFile)
// Print the RPT_QueryReport report
iPrintReport(RPT_QueryReport)
// Extract the name and extension of the generated file
NameGeneratedFile is string = fExtractPath(MyReportFile, fFileName + fExtension)
// Send the file to the browser
PageDisplay(NameGeneratedFile)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help