cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect Sub total in Smartform

Former Member
0 Kudos

Hi all,

I have a problem about a payroll. I am trying to get the sub total in every page. My smartform is doing this but in a wrong way.

Consider that you have 2 pages of payroll. at the end of the first page it gives me the sub total but before it gives me sub total it also adds the first amount of the next page. the total isnt wrong it doesnt adds over and over the amount of the second page. so as result the total is right but the sub total isnt.

at first it looks like a clear problem but it isnt. I tried that ;-).

With regards,

Tulu.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Tulu..

instead of using code lines....

just go to table controls calculations tab..

In operations Select Total...

Give field name and target field name...

will give correct total at the end of page..

..Regards

..Ashish

Former Member
0 Kudos

Dude,

I too faced the similar kind of a roblem but i dont remember exactly what i had done.

i would suggest you to use one variable and then add the values from your internal table in the loop.

This will surely help i think coz i remember doin this only.

Regards,

Ravi

Former Member
0 Kudos

Hi,

Please use for subtotals, In Main WINDOW>Table>Calucalation tab, In Caluculation tabOperation(Total)>Field name(Which is total of EX:netwr)-->Target field name(Varaible) -->After Loop, and clear varaible after displaying.

Regards

jana

Edited by: Janardhan Reddy on Sep 4, 2008 2:54 PM

Former Member
0 Kudos

Hi,

The problem lies with the clearing of the subtotal variable...

clear the subtotal variable after displaying it.

create program lines after display subtotal using the text node and write the code

clear <sub_total>

regards

padma

Former Member
0 Kudos

Hi

Under your text node..In the program lines write clear w_sum.

Regards,

Sravanthi