cancel
Showing results for 
Search instead for 
Did you mean: 

crystal reports show row data in details section in column format

former_member319241
Participant
0 Kudos

Hi,

I have a report for Employee attendance.

                             EmpID      EmpName    Total Leave      Leave Name       No Of Days

Group Header           1              abc                8                      

Details                                                                              Paid Leave                0

Details                                                                              Unpaid Leave             2

Details                                                                              Medical Leave            3

Details                                                                              Casual Leave             3

Group Footer

Now I want to add static columns Paid leave,Unpaid Leave,Medical and Casual Leave in the report.

                     EmpID  EmpName TotalLeave PaidLeave  UnpaidLeave MedicalLeave CasualLeave

Group Header    1           abc             8              0                  2                        3                         3

Details                                                                                           

                                                                                     

Group Footer

Please reply.Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Saurabh,

You're better off 'pivoting' this in a SQL Query. If you still wish to do this at the Report Level, here's what you need to do:

1) Create a formula called (@Paid Leave) with this code:

If {LeaveName} = "Paid Leave" then {No_of_Days}

2) Do the same for all the other Leave Types

3) Next, go to Insert > Choose the '@Paid Leave' formula field > Choose 'Sum' as the summary operation > Under 'Place this summary field', choose 'Group Footer 1'

4) Repeat Step 3 for all the other formulas

5) Move all the summaries from the Group Footer to the Group Header.

Hope this helps.

-Abhilash

ido_millet
Active Contributor
0 Kudos

Or simply insert a CrossTab in GH1.

Answers (0)