Hi,
I am developing a report by using crystal report in eclipse europa.
I have a problem that , i have a table which contains the two columns (Name, Gender)
I want to show two columns on report
1. Total number of male
2. Total Number of Female
so how to do that .
my logic:
i hv created a variable count for male and female and put filter that if gender=male then cnt++ else cnt1++
but i am not getting the exact result
please guide me step by step (if possible)
Hi,
You can use this formula also:
numberVar f;
numbervar m;
if ({Sheet1_.Gender}="Female") then (f:=f+1;)
else m:=m+1;
"There are " & Mid(CStr(m),1,length(cstr(m))-3) & " Males and " & Mid(CStr(f),1,length(cstr(f))-3)& " Females";
Note:Sheet1_.Gender comes from Report Fields.
Please let me know the results.
Thanks,
Neeraj
Add a comment