patriciosoria
13th January 2010, 23:30
I need to display the totals of some fields in the grid, I'm using a session Multi Main Table, I get the totals line but with values 0 and does not add or update the totals when you change any value for this code in the session satellite is as follows:

declaration:

table tpmgld023 | Registros conciliación bancaria


extern domain tfgld.amnt g.amnt.d, g.amnt.c, g.amth.d, g.amth.c

before.program:
fattr.total.line = true

on.display.total.line:
display.total.fields( "pmgld023.amth.d", g.amth.d,
"pmgld023.amth.c", g.amth.c,
"pmgld023.amnt.d", g.amnt.d,
"pmgld023.amnt.c", g.amnt.c )

field.pmgld023.amnt.d:
when.field.changes:

refresh.total.line()


field.pmgld023.amnt.c:
when.field.changes:

refresh.total.line()

Thank's for your help


Patricio

pprabhulkar
14th January 2010, 05:39
Hi,

Even though the function display.total.fields is a standard function & looks like it will calculate the total & display the total, we are not getting desired result.Why don't know...
Try this- variables which u have taken
g.amth.d,g.amth.c,g.amnt.d,g.amnt.c should be calculated as the total of the repective field.U have to write code for that & then use function as
display.total.fields( "pmgld023.amth.d", g.amth.d,
"pmgld023.amth.c", g.amth.c,
"pmgld023.amnt.d", g.amnt.d,
"pmgld023.amnt.c", g.amnt.c )

Thanks & Regards
Prashant Prabhulkar.