Skip to Content
avatar image
Former Member

Incorrect Sub total in Smartform

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Sep 04, 2008 at 08:27 AM

    Hi

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

    Regards,

    Sravanthi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 08:33 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 09:14 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Sep 04, 2008 at 11:51 AM

    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

    Add comment
    10|10000 characters needed characters exceeded