Hello Everyone,
Need some help please. Using CR 2008 and will like to calculate percentage.
Situation:
I have the follwoing info
Name Value Percentage
Joe 20
Ann 50
Prince 10
Total 80
Note that my Total = 80 is a formula because the individual values are formula and as such could not sum them up to get my totals but use a formula shown below to get the Total=80:
----------------------------------------
whileprintingrecords;
Numbervar x;
if not inrepeatedgroupheader then x := 0;
whileprintingrecords;
numbervar x := x + {@Value};
whileprintingrecords;
Numbervar x;
------------------------------------------
What i want to do now is calculate the percentage of the values based on the total, however because of my formula as shown above when i try to do something like:
(Value*100)/Total
i get an error message saying division by zero. How can i please work my percentage based on this formula (Total).
Any help appreciated.
Thanks
Sol
Need some help please. Using CR 2008 and will like to calculate percentage.
Situation:
I have the follwoing info
Name Value Percentage
Joe 20
Ann 50
Prince 10
Total 80
Note that my Total = 80 is a formula because the individual values are formula and as such could not sum them up to get my totals but use a formula shown below to get the Total=80:
----------------------------------------
whileprintingrecords;
Numbervar x;
if not inrepeatedgroupheader then x := 0;
whileprintingrecords;
numbervar x := x + {@Value};
whileprintingrecords;
Numbervar x;
------------------------------------------
What i want to do now is calculate the percentage of the values based on the total, however because of my formula as shown above when i try to do something like:
(Value*100)/Total
i get an error message saying division by zero. How can i please work my percentage based on this formula (Total).
Any help appreciated.
Thanks
Sol