cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform dynamically add pages

Former Member
0 Kudos

Hi everybody,

I have a smartform regarding a company.For each company i have several locations and for each location i have a table with some informations that need to be displayed.

My problem is that i will never know how many locations a company will have,only until runtime when i read some tables.My problem is that i have to display the informations for a location on a different page,so that i have to dynamically add pages in the smartform depending on the number of locations,which will be always different.

Does anybody know how i can do this?

thanx

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you have to add an extra page in which the data is printed you want.

You have to print this in the MAIN window.

In the MAIN window build in a loop (by loop or TABLE).

Do this at the end of MAIN window.

Inside this loop is the first thing a COMMAND (flow logic)

In this COMMAND your call your next page.

After that print and fill your variables.

succes.

Gr., Frank

Former Member
0 Kudos

Hi

I have done this ,but now my second page is not displayed.I have some general informations on the first page and i have to start displaying the table starting with the second page.All my informations from the 1-st page are displyed correctly but nothing on the second page.

I have the main window on both pages but i told him to start displaying it only starting with the second page,but the second page is not displayed at all.

What may be the problem?

thanks

Former Member
0 Kudos

have u define next page in the general attribute of Page1.

just check?

Former Member
0 Kudos

Hi ,

yes,i have placed the next page correctly but there was something wrong in my loop.In the end i have done like F.Bernsen advised me and it solved my problem.

So thank you for the quick help

Answers (1)

Answers (1)

Former Member
0 Kudos

in main window you to create the LOOP ..

after that create one program lines and within that put your

loop at itab.

at new of company code.

here check the flag

flag = x.

endat.

endloop.

if flag = X

call COMMAND and set the next page is NEXT.