Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Column with values based on specific record Post Reply Post New Topic
Author Message
flower
Newbie
Newbie


Joined: 18 Jun 2012
Online Status: Offline
Posts: 12
Quote flower Replybullet Topic: Column with values based on specific record
     Posted: 18 Jun 2012 at 9:04am
I have values as below,
 
Emp_No    Subject     Score
 
111           PHY              20
222           SCI              40
 
in my crystal report.
 
 
But I need to display as below,
 
Emp_No    PHY    SCI
 
111           20      40
 
Can someone show me how to do this.
 
Thanks.
IP IP Logged
flower
Newbie
Newbie


Joined: 18 Jun 2012
Online Status: Offline
Posts: 12
Quote flower Replybullet Posted: 18 Jun 2012 at 9:42am
Can someone reply. Bit urgent...
IP IP Logged
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Posted: 20 Jun 2012 at 2:47am
make a formula : detail_formula_phy:-
 
Whileprintingrecords;
numbervar physcore;
if {subject} = 'PHY' then physcore := {score} else physcore:= physcore;
 
and another for sciscore.  Put these in the detail line
 
Group on Emp_no
 
make more formulae : footer_formula_phy
Whileprintingrecords;
numbervar physcore;  
 
and also for sciscore.
 
One more formula  : reset
Whileprintingrecords;
numbervar physcore := 0;
numbervar sciscore :=0;
 
 
In the group footer, put Emp_no, and these two footer formulae, (and any other fields you want belonging to Emp_no)
 
In the group header, put reset. 
 
Suppress the detail line and the  group header and voila!
 
 
 
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