cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms: lines per page

Former Member
0 Kudos

Hi all,

We are facing a strange problem with a smartfom. The smartform displays a table that spans on many pages (say 5) with a subtotal per page. If we have like 90 rows in the table with 20 lines per page it generates 5 pages with subtotals. The problem is that the subtotal on the first page corresponds to the 21 first rows of the table instead of 20, although in the display itself only 20 are displayed int first page. What's even stranger is that when we we try to print the system field SFSY-PAGE with each line, the first page displays "1" tweenty times, which is normal, but on the second page it displays "1" on th first line and then "2" on the remaining 19 rows, it's like the system considers the 21 row of the table part of the first page, but displays row number 21 on the second. Do you have any idea where that might come from?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I think you are working on 4.6C system. The subtotals is a problem in that. You have to write logic for printing subtotals for 20 rows. Actually what happens is, the system tries to print some rows in page but if that page doesnot fit that particular row then it goes to the next page.

You have to write logic to substract the 21 row amount from the subtotal amount before printing.

Thanks,

Vamshi.

Former Member
0 Kudos

Thanks Vamshi for your answer. Actually I'm working on ECC6. I have 2 pieces of code for the logic, one in the main part of the table were I increment the subtotal, and one in the footer part of the table where i reset the subtotal. Normally the system should triger the code which resets the subtotal when there is a page break, am i worng?

Former Member
0 Kudos

Hey,

In ECC6.0, the system calculates the subtotals itself...i mean if you specify the varaibles for that. You create a table in the main window and there is Tab named calculations in that( besides table and data tabs). Here you can give the field names for which you need the subtotal and the target field which you print and you can specify the TIME there as After loop.

I think this would solve your problem.

Thanks,

Vamshi.

Former Member
0 Kudos

Hey,

Thanks for your solution, it’s definitely working. But just for curiosity, do you know when to use the events “before loop” “after loop” “before sort” “after sort”?

Former Member
0 Kudos

Hi ,

I am facing the same issue now. Did you find any solutiion to this issue? Please share your solution.

Thanks in advance,

Rajesh.