baanhp
27th November 2013, 15:25
Dear All,

I saw a print expression in report layout as below
total..96 ? round(total..80 * 100 / total..96,0,1) : 0

Can any body help me in understanding what is the meaning of the expression total..96

I have attached the screen shot alos, please check the attachment and revert.
I think in this way we can save extra coding of summing up in program script,. The BAAN report will handle totaling automatically.

Regards
Hara Prasad

JaapJD
27th November 2013, 16:07
This is an internal variable generated by repgen (the binary that creates the 3GL script based on the report definition). It is an intermediate result holding (running) totals, if you defined somewhere an aggregate expression in the report. Using it yourself in a print expression can be handy, but risky: at the moment you create somewhere another aggregate, this total may have been renamed to total..97.

mark_h
27th November 2013, 16:12
If you add a total field to a report this variable is used to calculate the totals as the report runs. So for example if you have a detail layout that has something like hours, and pieces completed. Then you add the field to lets say the after report section and make the function total. Then when you compile the report it includes the total.. variables in the report. You can then use these to perform other calculations. I have done this myself in a few reports. The big problem with this is if you add fields or change the report sometimes the total.. fields change. Then you have to figure out (you can do it in debug mode) to see what your new variable is - then modify your calculations. It can be a pain sometimes if a report changes a lot when you are first developing it. Sometimes it is just easier to control your own totals in a report and not use these total.. variables.

JaapJD
27th November 2013, 16:15
Hi Mark, I think we are on same path :-)

mark_h
27th November 2013, 18:20
Yep - I think so. :)

baanhp
29th November 2013, 10:12
Dear Mark and Japp

Thanks a lot for your quick reply, and taking your valuable time and knowledge sharing.
Your earnest help , solved my ISSUE and a quick delivery.

Its a very good exp in baanboard .

Thanking u all again.