Progress
Report Builder
Deployment Guide


Prompting for User Input for the Filter Information

The rbfilt2.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:

rbfilt2.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 */ 
  DO TRANSACTION:

    CREATE RBREPORT.

    ASSIGN 
      RBREPORT.RB-REPORT-LIBRARY = "c:\dlc\src\aderb\rbsample.prl"
      RBREPORT.RB-REPORT-NAME = "Customer List" 
      RBREPORT.RB-PRINT-DESTINATION = "D"   
      RBREPORT.RB-INCLUDE-RECORDS  = "O"
      RBREPORT.RB-FILTER  = rb-filter-value
      RBREPORT.RB-DISPLAY-ERRORS = yes
      RBREPORT.RB-DISPLAY-STATUS = yes.

      RELEASE RBREPORT.  

  END.

  RUN  aderb\_prore.p(false,
    "-db Runtable  -S servername -H hostname -N networktype -rbdel"). 

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 on the report.

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