Page 1 of 1

Repeating pages

PostPosted: Tue Feb 07, 2012 9:27 am
by Bebop
Hi folks,

here's what I want to do: I want to pass an internal table with data to a Smartforms form. For each line of this table I want to print one page. They all look the same.

Now, I have a PAGE_FIRST page with a MAIN window.
At the end of the MAIN window I have a line of code that reads the next line of the table. If not successful it sets a flag (global var)

Then follows a command with the condition that this flag is not set.
The command states "Go to page PAGE_FIRST". Now, it adds one empty page and ends the form all together.

But I want this command to do a Steely Dan: "Back, Jack, Do it again".
How can I do that ???

Best regards
Frank

Re: Repeating pages

PostPosted: Tue Feb 07, 2012 9:51 am
by Gothmog
Are you using a Loop node on the internal table for your Go to page PAGE_FIRST Command nodes ?

Re: Repeating pages

PostPosted: Tue Feb 07, 2012 9:54 am
by Bebop
Hey, just found that out myself. Of course I have to do a loop and use the command as page break as long as sfsy-page is smaller than the total number of lines in the table.

I was just thinking the wrong way.

Thanks a lot !
Frank

Re: Repeating pages

PostPosted: Tue Feb 07, 2012 10:37 am
by Gothmog
You don't even need to check the page number, if you do that in a loop on the internal table. :)

Re: Repeating pages

PostPosted: Tue Feb 07, 2012 10:40 am
by Bebop
Well, if I don't then I'll have an empty page at the end.

PAGE_FIRST
MAIN
LOOP
TXT1
TXT2
[...]
COMMAND PAGE_BREAK

After the last loop it would do another page break.

Thanks a lot !
Frank