Progress
Language Tutorial
for Windows
Formatting Long Text Strings
The remaining problem for simple output is how to handle long text strings. A text widget that contains a long string may cause formatting problems such as skipping to a new line or truncating. For screen design, you saw earlier that the editor widget is a good choice for holding long text strings. The editor is also the solution for reports. With the editor, you can output text in blocks.
For example, the Comments field in the Customer table has a format of x(60). Reserving 60 spaces takes up most of a line in a standard printed report. You can override this default behavior by specifying a VIEW-AS EDITOR phrase for the Comments field. When you output a field or variable value as an editor widget, Progress uses the INNER-CHARS attribute of the editor to format and wrap the text into a block. The INNER-LINES syntax sets the minimum number of lines the block occupies. If there is enough data to fill more lines than specified by INNER-LINES, then Progress provides the extra room.
The following exercise demonstrates editor output in reports:
Here is the code:
INNER-LINES reserves at least three lines per iteration of the report. INNER-CHARS sets the length of the text block at 25 characters.
INNER-LINES reserves at least three lines per iteration of the report. INNER-CHARS sets the length of the text block at 20 characters.
This section concludes the basic discussion on creating a reporting procedure. The next few sections concentrate on the techniques for populating reports with more complex data.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |