The PrintOut() method is an Interactive Reporting document and section level function, that is available regardless of the state of the application. As long as the application is running, PrintOut() method is available through scripting, and in Interactive Reporting Studio or Interactive Reporting Web Client, prints the Interactive Reporting document file according to the arguments provided, or opens a standard Print dialog box.
If EPM Workspace users encounter PrintOut() method in scripts, the data received in the browser includes a PDF file.
Note: | Script run in full before the PDF data is returned to the browser. This may cause some unexpected behavior with Interactive Reporting document files, such as those that display an alert that printing is complete, when in fact it has not yet started. Script authors should be aware of these factors when designing applications. |
Caution! | In Adobe Acrobat Reader, the default print settings are set to first page only. Reset the print range options to print the full document. |
PrintOut() method is prevented from executing in Interactive Reporting documents displayed in EPM Workspace if an Alert method is used after PrintOut() method. In EPM Workspace optional parameters of the method; for example, pages to print and number of copies are ignored, use the Adobe Acrobat Reader Print dialog box to specify those options.
PrintOut() method is not supported:
In scripts that run as the result of Document events (such as OnStartup)
For section-level activation and deactivation events
When used as a method of query or data model type sections
PrintOut() method has no effect on jobs; therefore, no printout occurs.
PrintOut() method takes five optional arguments:
Start page—A number, equivalent to setting the first number to print in a print dialog box, and must represent the first page to print in the document. This value is ignored in EPM Workspace.
End page—A number, equivalent to setting the last number to print in a print dialog box, and must represent the last page to print in the document. This value is ignored in EPM Workspace.
Number of copies—A number, equivalent to setting the print dialog box option for number of copies, and must represent 1 to n copies. This value is ignored in EPM Workspace.
PrintOut filename—A string, equivalent to setting the filename for printing to file, and should have a printer extension; for example, PRN or PS. The file is generated by the default printer driver, and requires that a default printer be available. The value must represent a properly formatted local or UNC path. URL syntax is not supported. This value is ignored in the EPM Workspace.
Prompt for dialog box—A Boolean, equivalent to displaying or hiding the print dialog box. The value must be false (0) or true (a number other than 0). The method does not persist with the Interactive Reporting document file or application.
Note: | The placeholder empty string; for example, (“”,””,””,””, “”) must be used to pass no value. If insufficient arguments are passed to the method, the PrintOut dialog box opens in a set location that cannot be programmatically changed. |