Progress
Language Tutorial
for Character


Printing Reports and the STREAM-IO Option

For toggle boxes, radio sets, sliders, combo boxes, and selection lists, trying to output the widget to any other device besides the screen yields nothing. Neither the widget nor the value it contains appears in files or printed reports.

Rather than tack a VIEW-AS TEXT phrase onto every widget, you can use the STREAM-IO option of the frame phrase to reduce every widget to textual data. Here is an example:

DEFINE VARIABLE Bal-due AS LOGICAL LABEL "Balance Due?"
  VIEW-AS TOGGLE-BOX.

DEFINE FRAME Frame1
  sports.Customer.Name
  Bal-due
    WITH DOWN STREAM-IO CENTERED THREE-D. 

You must use the STREAM-IO option on every output frame intended for a destination other than the screen.

Although primarily a tool for sending data to files and reports, the STREAM-IO option also reduces all widgets to textual data for screen output. This exercise demonstrates the effects of the STREAM-IO option on screen data. Perform the following steps:

  1. Open lt-10-03.p and run it. This report is the same as the one from the last exercise, but without the special interface.
  2. Press END-ERROR and then SPACEBAR to return to the Procedure Editor.
  3. Remove STREAM-IO from the frame phrase and run the procedure again.
  4. Note that the Bal-Due variable displays as a disabled toggle box in the iterations.

  5. Press END-ERROR and then SPACEBAR to return to the Procedure Editor.

If you scroll through the text of the procedure, you can see that the STREAM-IO option on the frame phrase of the iterating block is the only change.


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