Description
Runs Report Builder reports.
Syntax
Run_Report (reportName,list_statement [,options])
Parameters
The Run_Report subroutine has the following parameters.
Parameter | Description | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
reportName | The report name. Use the entity name of the fully-qualified entity id. | ||||||||||||||||||||||||||||||||||||||
list_statement | List statements may be passed to the function to print reports. | ||||||||||||||||||||||||||||||||||||||
options | Optional. A space delimited string of additional formatting options for reports.
| ||||||||||||||||||||||||||||||||||||||
Margins | A comma-delimited string of sizes in inches. The margins should be passed as LEFT,TOP,RIGHT,BOTTOM. |
Note: The reportName and list_statement parameters are mutually exclusive.
Remarks
The Run_Report function will execute using the active cursor, so a SELECT prior to a Run_Report call will use the results of the SELECT.
Example
Declare Subroutine Run_report * Run an existing report rptName = 'MY_REPORT' Run_Report(rptName,'') * A simple list statement stmt = "LIST BOOKS TITLE AUTHOR BY-DSND AUTHOR" Run_Report('',stmt) * A simple list statement creating a PDF file stmt = "LIST BOOKS TITLE AUTHOR BY-DSND AUTHOR" Run_Report('',stmt,'PDFFILE C:\TEMP\MY_PDFILE.PDF') * Run an existing report to the printer with landscape orientation rptName = 'MY_REPORT' Run_Report(rptname,'','(P LANDSCAPE') * Run an existing report using a previously executed select. stmt = "SELECT BOOKS WITH AUTHOR [] 'CLANCY'" RList( stmt, 5, "", "", "" ) error = Get_Status( errCodes ) if error then Fsmsg( errCodes ) end else Run_Report( "MY_REPORT", "", "" ) end