Progress
Report Builder
Deployment Guide


Prompting for User Input for the Filter Information

The rbfilt4.p sample procedure runs the Customer List report in the rbsample.prl report library and prompts the user for minimum and maximum values for the filter condition:

rbfilt4.p
  DEF VAR high-value AS INTEGER INITIAL 0.
  DEF VAR low-value AS INTEGER INITIAL 0.
  DEF VAR rb-filter-value  AS CHARACTER INITIAL "".

/* 1 */ 
  FORM  "Enter Low  Value for CUSTOMER NUMBER: "  low-value at 20  SKIP
    "Enter High Value for CUSTOMER NUMBER: " high-value at 20 
    WITH FRAME TEST-FRAME CENTERED NO-LABELS.

/* 2 */ 
  UPDATE low-value high-value WITH FRAME TEST-FRAME.
  HIDE FRAME TEST-FRAME.

/* 3 */ 
  rb-filter-value = "Customer.Cust-num >= " + STRING(low-value) + 
    " AND Customer.Cust-num <= " + STRING(high-value).

/* 4 */ 
  RUN aderb\_printrb(
    "c:\dlc\src\aderb\rbsample.prl", /* RB-REPORT-LIBRARY */
    "Customer List",                 /* RB-REPORT-NAME */
    "",                              /* RB-DB-CONNECTION */
    "O",                             /* RB-INCLUDE-RECORDS - letter O*/
    rb-filter-value,                 /* RB-FILTER */
    "",                              /* RB-MEMO-FILE */
    "D",                             /* 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 */ 

The commented numbers correspond to the following step-by-step descriptions:

  1. Define a form for the prompt.
  2. Prompt the user for filter information.
  3. Assign the filter override condition to rb-filter-value.
  4. Run the Customer List report with the filter override.
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