Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Group by Subreport Value Post Reply Post New Topic
Author Message
bal1
Groupie
Groupie


Joined: 28 Nov 2012
Online Status: Offline
Posts: 44
Quote bal1 Replybullet Topic: Group by Subreport Value
     Posted: 06 Feb 2013 at 4:12am
Could someone please help me to group by a value in a subreport for my main report?
Example:

Main report
Date ID Name   Result

Subreport
SubValue
(this value is specific and can't be included in main report)

Now I want to group the main report columns by the subreport SubValue

SubValue A
Date ID Name Result
Date ID Name Result
Date ID Name Result
SubValue B
Date ID Name Result
Date ID Name Result
SubValue C
etc etc

Thanks!
IP IP Logged
bal1
Groupie
Groupie


Joined: 28 Nov 2012
Online Status: Offline
Posts: 44
Quote bal1 Replybullet Posted: 07 Feb 2013 at 11:01am
Hi...is anyone able to help with this?
Thanks!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Feb 2013 at 11:08am
i do not really understand your question but in general you cannot use a reult from a sub report to group on in the main report.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 07 Feb 2013 at 11:30am
And the reason that you can't do this is that Crystal needs to have the group values prior to processing anything in the group - including subreports.
 
So, the question is, can you rearrange your report so that what's now the subreport becomes the main report and the current main report becomes a subreport?
 
-Dell
IP IP Logged
bal1
Groupie
Groupie


Joined: 28 Nov 2012
Online Status: Offline
Posts: 44
Quote bal1 Replybullet Posted: 07 Feb 2013 at 11:32am
Ah..great question...I'll look into that, thanks.
I guess my only other option would be to sort the data out in a staging table or something, correct?
IP IP Logged
natali
Newbie
Newbie
Avatar

Joined: 15 Jan 2013
Online Status: Offline
Posts: 26
Quote natali Replybullet Posted: 08 Feb 2013 at 3:20am

I am not sure what exactly you would like to do but I had a similar problem.  Then I grouped main report and linked subreport to the main (right click on subreport and change links).

natali

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 08 Feb 2013 at 3:33am
bal1,
 
That is correct.
 
-Dell
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