Consultor Eletrônico



Kbase P15021: How to direct a Report Builder report to a file?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/18/2006
Status: Unverified

GOAL:

What are the possible Report Builder print destination values?

GOAL:

Where can I find a list of all the Report Builder RB-PRINT-DESTINATION Values?

GOAL:

How to direct a Report Builder report to a file.

FACT(s) (Environment):

Report Builder Engine

FIX:

The following are the possible values of the Report Builder RB-PRINT-DESTINATION parameter along with their description:
D: Displays the report on the screen. This allows the user to preview the report before printing it. After previewing the report, the user can choose Print on the Preview screen to send the report to the printer specified in the report definition or specified as the RB-PRINTER-NAME value. If the value of RB-PRINT-DESTINATION is D and you specify RB-OUTPUT-FILE, when the user chooses Print in Preview, Report Engine outputs the report to the file specified in RB-OUTPUT-FILE, using control codes for the printer specified with RB-PRINTER-NAME.
A: Sends the report to the text file named as the RB-OUTPUT-FILE value. Report Engine exports the report as a text file without printer control codes.
?: Allows the user to select the print destination (screen or printer) at run time. When the value of RB-PRINTER-NAME is a question mark, Report Engine prompts the user to also choose the printer at run time. If you specify RB-WINDOW-TITLE, the dialog box title bar contains the RB-WINDOW-TITLE value. If RB-WINDOW-TITLE is empty, the title bar displays the report name.
blank: Sends the report directly to the printer specified in the report definition or specified by RB-PRINTER-NAME, or if RB-OUTPUT-FILE is specified to that file. Report Engine includes the printer control codes in the output file for the specified printer, or if no printer is specified, for the saved printer.
The following sample call sends the report to the file "CustomerReport.txt" by setting the RB-PRINT-DESTINATION parameter to "A" and the RB-OUTPUT-FILE parameter to "CustomerReport.txt" :

RUN aderb\_printrb (

"c:\dlc\src\aderb\rbsample.prl", /* RB-REPORT-LIBRARY */

"Customer List", /* RB-REPORT-NAME */

"", /* RB-DB-CONNECTION */

"", /* RB-INCLUDE-RECORDS */

"", /* RB-FILTER */

"", /* RB-MEMO-FILE */

"A", /* RB-PRINT-DESTINATION */

"", /* RB-PRINTER-NAME */

"", /* RB-PRINTER-PORT */

"CustomerReport.txt", /* RB-OUTPUT-FILE */

0, /* RB-NUMBER-COPIES - zero */

0, /* RB-BEGIN-PAGE - zero */

0, /* RB-END-PAGE - zero */

no, /* RB-TEST-PATTERN */

"", /* RB-WINDOW-TITLE */

yes, /* RB-DISPLAY-ERRORS */

yes, /* RB-DISPLAY-STATUS */

no, /* RB-NO-WAIT */

""). /* RB-OTHER-PARAMETERS */