Cannot get the percentages to equal 100
Posted on 2011-03-22
Hello - I've worked on this for a rediculous number of hours....I have a report that calculates the monthly percentages of incidents by incident type. I calculate the percent and store it in a field that has a Number data type, field size of 'Double', a format of 'General Number' and a Decimal places = 2. I do round the percent calculation and it looks like this:
Round(([rstTotalInc].Fields(2) * 100) / varTotalIncYear1, 3)
On the report, the percentage fields Format is set to Auto for Decimals.
The problem is that when I total the percentages, I cannot get them to equal 100 unless I allow the field on the report to go to 3 decimals. Even then sometimes it sums to 99.999. I've tried rounding, not rouding, changing the data type, etc. I would like the percentages for each incident type to be percentages with no numbers to the right of the decimal and to have the same format for the total percentage and I would like it to equal 100. Any help would be most appreciated. Thank you.