using a Look ahead variable in a group total calc
Hi,
RB 14.03 with Delphi XE2
Using the end user reporting solution, I have placed a DBCalc (Sum) with
look ahead and no reset group on the report title band. This prints the
grand total i'm summing correctly. I am trying to calculate a percentage in
each group footer using a group footer variable / DBCalc.Value * 100.00. No
matter what I try, it always calcs based on the progressive total of the
DBCalc NOT at the grand total level which is printed on the report title. I
have tried testing to fire the calc on report 2nd pass, i've tried changing
it to an onprint event after 2nd pass. I can put the DBCalc in the footer
band & it will actually print the grand total value, but it will still calc
the % using the progressive figure at that point !
I just want to show a % that the group total represents of a grand total -
surely this can't be that hard ?
Note again - this is using the end user reporting solution only.
Thanks,
Rick.
RB 14.03 with Delphi XE2
Using the end user reporting solution, I have placed a DBCalc (Sum) with
look ahead and no reset group on the report title band. This prints the
grand total i'm summing correctly. I am trying to calculate a percentage in
each group footer using a group footer variable / DBCalc.Value * 100.00. No
matter what I try, it always calcs based on the progressive total of the
DBCalc NOT at the grand total level which is printed on the report title. I
have tried testing to fire the calc on report 2nd pass, i've tried changing
it to an onprint event after 2nd pass. I can put the DBCalc in the footer
band & it will actually print the grand total value, but it will still calc
the % using the progressive figure at that point !
I just want to show a % that the group total represents of a grand total -
surely this can't be that hard ?
Note again - this is using the end user reporting solution only.
Thanks,
Rick.
This discussion has been closed.
Comments
Take a look at the following article on using a lookahead value in a
calculation. There is an example for Delphi and RAP available.
http://www.digital-metaphors.com/rbWiki/Delphi_Code/Calculations/How_To...Use_a_Look_Ahead_Value_in_a_Calculation
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com