CrossTab - Percentages
Hi,
I need to convert the number values in a crosstab to percentages. Is this
possible just using RAP and not writing Delphi Code?
Currently I am using the OnCalcDimensionValue event to do the calculations.
I take the aValue and change it to a percent. I seem to get it kinda
working, but I now need to get the total number of records from my query.
How can I do that... This is an enduser report so I don't have the luxury of
using Delphi Objects here.
Thanks!
Dana
I need to convert the number values in a crosstab to percentages. Is this
possible just using RAP and not writing Delphi Code?
Currently I am using the OnCalcDimensionValue event to do the calculations.
I take the aValue and change it to a percent. I seem to get it kinda
working, but I now need to get the total number of records from my query.
How can I do that... This is an enduser report so I don't have the luxury of
using Delphi Objects here.
Thanks!
Dana
This discussion has been closed.
Comments
crosstab's OnGetTotalValueText event to store the total value in that
variable. During the second pass you'll have the total value available to
calculate percentages in OnCalcDimensionValue. Make sure to perform those
calculations only during the second pass of that event to avoid unnecessary
work and division by zero errors. You can check the current pass by querying
Report.FirstPass and Report.SecondPass Boolean values.
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com