![]()
I am working on a cross tab report.
I am trying to display CT Open, CT Closed and the percentage of closed. By month and by WO type
I have a formula for CT Open
if {WOCR.WOKey}>1 then 1 else 0
Formula for CT Closed
if {WOCR.Closed} then 1 else 0
The counts are showing up right
I created an additional formula
Also created a formula {@0}:
whilereadingrecords;
0
I have added the summary fields in the crosstab, and add sum of {@0} as my last summary
Then in preview mode, I select sum of {@opened} ->right click->format field->suppress->x+2 and enter:
whileprintingrecords;
numbervar open := open + currentfieldvalue;
false
Select {@closed}->right click->format field->suppress->x+2 and enter:
whileprintingrecords;
numbervar closed := closed + currentfieldvalue;
false
Then select the 3 column ({@0}->right click->format field->display string->x+2 and enter:
whileprintingrecords;
numbervar open;
numbervar closed;
totext(closed%open,2)+"%"
Since I have zeros in many fields I am getting Divide by zero errors when adding the last formula to the display string.
Any assistance would be appreciated.
Thanks