Hello all:
Using CR XI, trying to create a combined summary in one field. Example of result:
Individuals Tested: 450
Yes Cases: 400 / 88.89%
No Cases: 50 / 11.11%
I can't seem to get the percentages to round to two significant digits:
***************
whileprintingrecords;
numbervar CountYes;
numbervar CountTotal;
if CountTotal <> 0 then
CountYes & " / " & round(CountYes%CountTotal,2) & "%"
else
"0 / 0%"
***************
Result:
Yes Cases: 400 / 88%
The "No Cases" formula is the same other than CountNo. At first, I thought this might be a limitation of the % function, so I tried a longer version:
************
whileprintingrecords;
numbervar CountYes;
numbervar CountTotal;
if CountTotal <> 0 then
CountYes & " / " & round(CountYes / CountTotal * 100, 2) & "%"
else
"0 / 0%"
***********
Result:
Yes Cases: 400 / 88%
Any ideas? Thanks!
Using CR XI, trying to create a combined summary in one field. Example of result:
Individuals Tested: 450
Yes Cases: 400 / 88.89%
No Cases: 50 / 11.11%
I can't seem to get the percentages to round to two significant digits:
***************
whileprintingrecords;
numbervar CountYes;
numbervar CountTotal;
if CountTotal <> 0 then
CountYes & " / " & round(CountYes%CountTotal,2) & "%"
else
"0 / 0%"
***************
Result:
Yes Cases: 400 / 88%
The "No Cases" formula is the same other than CountNo. At first, I thought this might be a limitation of the % function, so I tried a longer version:
************
whileprintingrecords;
numbervar CountYes;
numbervar CountTotal;
if CountTotal <> 0 then
CountYes & " / " & round(CountYes / CountTotal * 100, 2) & "%"
else
"0 / 0%"
***********
Result:
Yes Cases: 400 / 88%
Any ideas? Thanks!