cancel
Showing results for 
Search instead for 
Did you mean: 

Secondary Window looping and lineitems restricting

Former Member
0 Kudos

Hi All,

I have some requirement wherein i have to loop the secondary window in smartforms . This is Z smartforms and has standard driver program.

The main requirement is suppose there are 10 line items , 8 line items should be displayed on Page 1 and the remaining 2line items should be displayed on next page.

In my current scenario , i am getting same line items on the next page too.

i tried out using the condition tab but it didnot worked out. If its a main window it goes directly to next page but donot know

how it works out with secondary window .

Has anyone come across similar requirement ? Any help would be appreciated ...

Thanks

SAM F.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Sam,

Since you are using the Secondary window follow the below given method.

1). In the first page add a LOOP logic to your window and start printing your data.

2). Keep adding the counter for each and every record you process.

2). once you have reached the number of data you need to print say 8 records add a command line to move the control to next page ( this can be done by using a condition inside the loop).

3). In the next page you will have a similar window and in the that window also create a LOOP logic and the Row (belowinternal table field ) give the start row as the next row of the table. i.e., the row after the last row you have displayed in the first page. here you can give the To as (from + no. of rows you need to print in there) .

Like wise you can keep printing the data you require in the secondary window of a smartform.

Hope this helps.

Regards,

Praveenkumar T.

Former Member
0 Kudos

Hi,

creat command window in page1 and when you open command window there is option like *go to new page * give page2 then only your second page will display,,,,,,,,,,,,,,,,,

make sure that main window in page1 width i.e page1-main window -width = page2-main window-width.......this can change in output option -position size for main window in both page,otherwize run time error will face.

Thanks.

Former Member
0 Kudos

You will have to make two different windows. One on the first page that will loop over your lines and will print only the first 8 (or total - 2). And another one on the second page that prints the last two lines.

Former Member
0 Kudos

Hi,

Give the next page of page 1 as page 1 itself and then write the condition in the condition tab. The remaining contents will be printed in the next page automatically.

Regards,

Aravind.

Former Member
0 Kudos

Hi Aravindan,

I tried out your way , but it didnot work.

This could be because it is secondary window and not the main window.

Sam.