cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional page-break in smartforms

Former Member
0 Kudos

I have a requirement in smartform where in the first page only 10 line items will be displayed, and from 2nd to 5th page 15 line items will be displayed. And if any more line items are present in the internal table, then that will be displayed on the 6th page & onwards, where no page break is applied.

Thanks & regards,

Feluda

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you have to set one counter vaiable in item table.

You have to call next page using command in table if page no is 1 and counter mod 10 is 0.

Also you need to keep another command on condition as page no less than 6 and counter mod 15 is 0.

For remaining items it will behave as normal.

Hope this will help.

Thanks

Dhiraj.

Former Member
0 Kudos

Thank you Dhiraj for your answer.

But i have several questions queries for your answer & they are.

1> Do i need only 1 page (say, page1) which will call the page itself?

2> You have written:

" Also you need to keep another command on condition as page no less than 6 and counter mod 15 is 0."

Where shall i calculate page no. and counter mod 15 = 0?

3> What will ensure that after 10 lines second page will get triggered & every 15 lines 3rd to 6th page will be triggered?

Thanks & warm regards,

Feluda

Former Member
0 Kudos

Hi,

Find my suggestions below

1> Do i need only 1 page (say, page1) which will call the page itself? YES

2> You have written:

" Also you need to keep another command on condition as page no less than 6 and counter mod 15 is 0."

Where shall i calculate page no. and counter mod 15 = 0?

In the main window item table .

You can increament counter by each pass.

3> What will ensure that after 10 lines second page will get triggered & every 15 lines 3rd to 6th page will be triggered?

There will be two commands in you itam table loop.

First with condition that its first page and counter mod 10 0.

That mans you are on first page and next page will be triggered after 10 lines.

Second where pageno is less than 6 and (counter-10) mod 15 is zero.

This means you are on second page and lyou are on 25th item of table the comman will be triigerd and you move on to third page.

This continues tilll page 6.

Hope this will help u.

Thanks

Dhiraj.

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

Lemme try to answer your questions:

1> Do i need only 1 page (say, page1) which will call the page itself?

Depends on you requirement. You can do with a single page if all the 15 rows fit into the window!

2> You have written:

" Also you need to keep another command on condition as page no less than 6 and counter mod 15 is 0."

Where shall i calculate page no. and counter mod 15 = 0?

Check the system field SFSY-PAGE for the current page no. You need to increment the counter in the "Calculations" tab of the TABLE you're using. Add the conditions in the "Conditions" tab of the command field

3> What will ensure that after 10 lines second page will get triggered & every 15 lines 3rd to 6th page will be triggered?

Step 2 should answer this.

Former Member
0 Kudos

Hi,

Follow the steps what Suhas says it will work. If not than plz do the same in Global definitions -> initialization of the smartform accordingly. It may be helpful.

Regards,

Akg

Answers (0)