Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Passing subreport total to main report Post Reply Post New Topic
Author Message
Deverdits
Newbie
Newbie


Joined: 28 Feb 2011
Online Status: Offline
Posts: 7
Quote Deverdits Replybullet Topic: Passing subreport total to main report
     Posted: 05 Oct 2011 at 2:24am
Hi Everyone,
 
I have a subreport where I take the count of items from a group and put it into a shared variable.  In my main report I use that to display in the matching group's footer.  The problem I'm running into is the total in the shared variable displays in the next group's row in the main report.  So every value is shifted down a row.  why is this happening?
 
I have the item that forms the group linked between the main and subreports.  The subreport in the line item displays the correct information, but the passing of the value seems to happen at the wrong time.
 
Any help is appreciated.
Thanks
John.
IP IP Logged
venky_115
Groupie
Groupie
Avatar

Joined: 15 Jun 2010
Location: United States
Online Status: Offline
Posts: 67
Quote venky_115 Replybullet Posted: 05 Oct 2011 at 2:38am
where is the sub-report placed in the main report?
Regards
IP IP Logged
Deverdits
Newbie
Newbie


Joined: 28 Feb 2011
Online Status: Offline
Posts: 7
Quote Deverdits Replybullet Posted: 05 Oct 2011 at 2:48am

It was in the footer.  I just tried to put it into the header and if I use the group footer in the main report to show the value of the shared variable then it works fine.  However I'm trying to have one line only for each entry and if I hide the header all I get is zeros in the footer. 

How can I have my cake and eat it too? Smile 
IP IP Logged
venky_115
Groupie
Groupie
Avatar

Joined: 15 Jun 2010
Location: United States
Online Status: Offline
Posts: 67
Quote venky_115 Replybullet Posted: 05 Oct 2011 at 3:01am
give a try with this condition
if sharedvariable<> 0 then sharedvariable
Regards
IP IP Logged
Deverdits
Newbie
Newbie


Joined: 28 Feb 2011
Online Status: Offline
Posts: 7
Quote Deverdits Replybullet Posted: 05 Oct 2011 at 3:04am
not sure where I should put that.
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