Progress
Report Builder
Deployment Guide


Prompting for User Input for the Printer Information

The rbprint2.p sample procedure runs the Accts Receivable report in the rbsample.prl report library and prompts the user for the printer destination and printer name using the Report Engine built-in prompting mechanism:

rbprint2.p
RUN aderb\_printrb(
  "c:\dlc\src\aderb\rbsample.prl",  /* RB-REPORT-LIBRARY */
  "Accts Receivable",               /* RB-REPORT-NAME */
  "",                               /* RB-DB-CONNECTION */
  "",                               /* RB-INCLUDE-RECORDS */
  "",                               /* RB-FILTER */
  "",                               /* RB-MEMO-FILE */
  "?",                              /* RB-PRINT-DESTINATION */
  "?",                              /* RB-PRINTER-NAME */
  "",                               /* RB-PRINTER-PORT */
  "",                               /* 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 */ 

Although you might expect to see code that explicitly prompts the user for the printer destination and printer port, you do not have to do this. Simply enter question marks (?) in the RB-PRINTER-NAME and RB-PRINTER-PORT parameters, and Report Engine automatically allows the user to select the print destination (screen or printer) and printer at run time.

NOTE: If you are using the PRNTRB2 interface you must modify the procedure to run aderb\_prntrb2 and include the RB-STATUS-FILE parameter.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095