Kbase P164031: 4GL/ABL: Why is my report displayed with double spacing on the screen?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  25/05/2010 |
|
Status: Unverified
GOAL:
4GL/ABL: Why is my report displayed with double spacing on the screen?
GOAL:
Why does my report display double spaced rows?
GOAL:
How to make sure that my report displays with single spaced lines?
GOAL:
Why does this code generate what appears like double spaced rows?
FOR EACH customer WHERE custnum < 10 BREAK BY SalesRep:
IF FIRST-OF (SalesRep) THEN DO:
DISPLAY
SalesRep VIEW-AS TEXT
name VIEW-AS TEXT
creditlimit .
NEXT.
END.
IF LAST-OF (SalesRep) THEN DO:
DISPLAY name creditlimit.
DOWN 1.
END.
ELSE
DISPLAY name creditlimit.
END.
GOAL:
How can I fix this row spacing issue in the above code?
FACT(s) (Environment):
Windows
Progress 9.x
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)
FIX:
The fields in the report are by default displayed as fill-in widgets using the default font. The default sizing of fill-ins occurs when you use the default font. This sizing is larger than when fill-in is view-as text where no space is allocated to the fill-in borders or padding and hence the height and width allocated to displaying the data is much smaller. The double space appearance is due to the default proportional font use and to the space allocated by the AVM for the FILL-IN padding on all sides.
One way to resolve this issue is to specify the STREAM-IO option in the DISPLAY statement to display the data with the default system fixed font and drop all border padding for FILL-IN widgets responsible for the double spacing appearance. For example, modify the first DISPLAY statement in the above code to specify the STREAM-IO option as follows:
FOR EACH customer WHERE custnum < 10 BREAK BY SalesRep:
IF FIRST-OF (SalesRep) THEN DO:
DISPLAY
SalesRep
name
creditlimit WITH STREAM-IO.
NEXT.
END.
IF LAST-OF (SalesRep) THEN DO:
DISPLAY name creditlimit.
DOWN 1.
END.
ELSE
DISPLAY name creditlimit.
END.
Another way to resolve this issue is to specify the USE-TEXT option in the DISPLAY statement to make the default widget type for all widgets in the frame is TEXT rather than FILL-IN. Thus, eliminating all border padding on the widgets and removing the appearance of the double spaced screen report and keeping the default font of the report:
FOR EACH customer WHERE custnum < 10 BREAK BY SalesRep:
IF FIRST-OF (SalesRep) THEN DO:
DISPLAY
SalesRep
NAME
creditlimit WITH USE-TEXT.
NEXT.
END.
IF LAST-OF (SalesRep) THEN DO:
DISPLAY name creditlimit.
DOWN 1.
END.
ELSE
DISPLAY name creditlimit.
END.