Reputation: 59
Hopefully this will be my last question for a while. I know there isn't much to be said about Progress's UI capability, but I'm having what seems to be a really strange problem with displaying in a frame.
Here is some pseudo code to help you understand the problem:
DEF TEMP-TABLE tMainTable.
DEF TEMP-TABLE tPage LIKE tMainTable.
DEF VAR iCursor AS INT.
/* SOME INPUT DETECTION */
/* Moving the cursor */
FIND FIRST tMainTable WHERE tMainTable.UniqueId EQ iCursor.
DO i = 1 TO iMaxPageSize:
CREATE tPage.
BUFFER-COPY tMainTable TO tPage.
END.
/* DISPLAY */
FOR EACH tPage:
DISPLAY tPage.iNumber tPage.Name.
END.
These are the basics of the program. Now the desired output, would have the FRAME displaying these to end right under the last entry. Currently, using the default FRAME, it scales to the bottom of the terminal screen.
Though, when I instantiate a FRAME and interchange all of the logical available options, I can get it to size to where I want it, but can't get it to display the entries in seperate lines. What it looks like it's doing instead, is displaying each entry on the same line, overwriting the last one, as it always shows the last record in the TEMP-TABLE.
I tried instantiating the FRAME "WITH iMaxPageSize DOWN", with no effect. After reading a little deeper on this particular option, it looks like it's only available for displaying multiple fields in a table, and not certain fields of multiple tables.
Hope this made sense, I really need help with this.
Upvotes: 0
Views: 1515
Reputation: 59
Figured it out, took me a cumulative of 8 hours of reading, and trial-and-error coding.
FOR EACH tPage WITH 6 DOWN:
Was all I needed.
It still bugs me that when I instantiated a FRAME, I could only ever get it to display one record despite using it in a FOR EACH.
Upvotes: 1
Reputation: 3251
you need to do something like this - the FIND / DO combination isn't doing what you think it is.
DEF TEMP-TABLE tMainTable.
DEF TEMP-TABLE tPage LIKE tMainTable.
DEF VAR iCursor AS INT.
DEF VAR i AS INT.
i = 0.
FOR EACH tMainTable
WHERE tMainTable.UniqueId EQ iCursor
NO-LOCK:
i = i + 1.
IF i > maxpagesize THEN
LEAVE.
CREATE tPage.
BUFFER-COPY tMainTable TO tPage.
END.
/* DISPLAY */
FOR EACH tPage:
DISPLAY tPage.iNumber tPage.Name
WITH DOWN.
END.
Upvotes: 0