Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Grouping data in Report Post Reply Post New Topic
Author Message
run4soumya
Newbie
Newbie
Avatar

Joined: 16 Aug 2010
Location: India
Online Status: Offline
Posts: 2
Quote run4soumya Replybullet Topic: Grouping data in Report
     Posted: 23 Aug 2010 at 11:44pm
I have table structure like
EmployeeName
EmployeeType
EmployeeAddress
EmployeeSalary

And in Table the records inserted in the manner as
Ename      Etype      Eaddress      ESalary
S     Reg.     A1          1000
W     Contr.     A2          1200
E     Reg.     A3          1300
R     Contr.     A4          1225
F     Sal.     A5          1375
H     Reg.     A6          1600

Now I have to show a report group by EmployeeType in the Following format in Crystal Report.

Name     Address          Salary
F     A5               1375

Name     Address          Salary
S     A1               1000
E     A3               1300
H     A6               1600

Name     Address          Salary
W     A2               1200
R     A4               1225



EmployeeType     TotalSalary
Contr.               1375
Reg.               3900
Sal.               2425

Please provide me any solution how I can show the report in Crystal Report. Thanks in advance.


Edited by run4soumya - 23 Aug 2010 at 11:46pm
IP IP Logged
Senthil Raj
Newbie
Newbie
Avatar

Joined: 02 Aug 2010
Location: India
Online Status: Offline
Posts: 27
Quote Senthil Raj Replybullet Posted: 24 Aug 2010 at 1:01am
Hi,
One thing u can do is, u can use subreport
u group by Etype in one report show the details required and in subreport again group by Etype  and show only sum of the salary in group footer and place the subreport in the report footer
IP IP Logged
sukhveer
Newbie
Newbie


Joined: 18 Aug 2010
Online Status: Offline
Posts: 22
Quote sukhveer Replybullet Posted: 26 Aug 2010 at 8:10pm

If your EmployeeType has limited data then you can do it quite easily...

Create a RunningTotal each for EmployeeType
(A)
FieldToSummarize -> Esalary
TypeOfSummary -> Sum
Evaluate -> Use a Formula (Etype='Contr.')
Reset -> Never
(B)
FieldToSummarize -> Esalary
TypeOfSummary -> Sum
Evaluate -> Use a Formula (Etype='Reg.')
Reset -> Never
(C)
FieldToSummarize -> Esalary
TypeOfSummary -> Sum
Evaluate -> Use a Formula (Etype='Sal.')
Reset -> Never
 
Place your A,B,C fields in your Report Footer section
Now you have your summarized values.. about your labels.. you can insert Text Objects to label them.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum