I am using SAP Crystal for VS 2010 to generate report. I have a Boolean field named Status in the report that indicate whether a person was present or not .
I want to know whether it is possible to get the number of times a person was present/absent and how it can be implemented. In other words, I want to be able to indicate the number of Yes/No or 1/0 for a person
Any assistance would greatly appreciated.
Assuming the report is grouped on 'Person', here's what you can do:
if Status = 1 then
present := present + 1
else if Status = 0 then
absent := absent + 1;
Place this formula field on the report beside the Status variable and suppress it.
Next, create this formula to count the no. of times the person was present/absent. Place this formula on the Group Footer:
"This person was Present :"&present&" time/s"&chr(13)&
" and Absent :"&absent&" time/s"
Lastly, create a formula to reset the variables and place it on the Group Header. You may keep this field suppressed.
numbervar present := 0;
numbervar absent := 0;
Let me know how this goes!