Try OpenEdge Now
skip to main content
Programming Interfaces
Input/Output Processes : Creating Reports : Converting widget values to report data : Printing reports and the STREAM-IO option
 
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 lBalDue AS LOGICAL NO-UNDO LABEL "Balance Due?"
VIEW-AS TOGGLE-BOX.

DEFINE FRAME Frame1
sports2000.Customer.Name
lBalDue
  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.
To see the effects of the STREAM-IO option on screen data:
1. Open i-10-03.p and run it. This report is the same as the one from the previous 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.
Notice that the lBalDue variable displays as a disabled toggle box in the iterations.
4. 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.