Click here to Skip to main content
15,306,245 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Code Name 01 02 03 04 05...... 31
A001 abc     P   A  P  P  P
B001 xyz     P   P  P  N  A

I want to calculate Employee abc is present how many days in crystal report where bold text is my column names and P is Present A is Absent and N is No record (Blank) value in Report..

Thanks in Advance
Posted
Updated 20-Mar-14 0:16am
v3
Comments
Aravindba 27-Mar-14 6:37am
   
hi if u deploy in server machine ,report work fine ? not in developer machine

hi,
status is P/A instead of this fetch 1/0 status (integer value)
Now display status it will show sum of status (1=present days) automatically
and now another problem is to display 0 as "A" and 1 as "P" for this..
write a formula...
iif({status}="0","A","P")

Happy Coding!
:)
   
Comments
chetna2810 21-Mar-14 6:28am
   
hi..
Thanks for replying
I am creating a attendance report. So i have to print P and A (fetch the records like this only)..
I tried this
numberVar X :=0 ;
if ({EmpFinalAttendanceReport.01} = "P")
then X := X +1;
if ({EmpFinalAttendanceReport.02} = "P")
then X := X +1;
if ({EmpFinalAttendanceReport.03} = "P")
then X := X +1;
if ({EmpFinalAttendanceReport.04} = "P")
then X := X +1;

got the answer but if i have no record on particular date then its stop working.
hI CHEETU

place your formula in detail section

then right click on formula

insert summary

and place summary to report footer.

Hope this will work for you.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900