Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: passing a group total subreport to a main report Post Reply Post New Topic
Author Message
sandesh
Newbie
Newbie


Joined: 05 Jun 2012
Location: India
Online Status: Offline
Posts: 4
Quote sandesh Replybullet Topic: passing a group total subreport to a main report
     Posted: 05 Jun 2012 at 11:20pm
Hi
I created a main report. In that i am having one sub report. I want sub report group total in main report. i used shared variable. Still its not happening.
This formula i used in subreport.(Footer part)
WhilePrintingRecords;
Shared Numbervar myTotal :={@Clean_sub}


This formula i used in main report (on Group footer)
WhilePrintingRecords;
Shared  NumberVar myTotal;
myTotal;

Please tell me if iam missing anything.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Jun 2012 at 11:58am
the simplest question is: is the subreport being called before the group footer?
 
I typically make an additional group footer above my 'main' group footer and place the subreport there.  This way, I am sure that the subreport runs before I need the shared variable.
 
HTH
IP IP Logged
sandesh
Newbie
Newbie


Joined: 05 Jun 2012
Location: India
Online Status: Offline
Posts: 4
Quote sandesh Replybullet Posted: 07 Jun 2012 at 8:33pm
Yes... My sub report is detail section. I tried it on Group footer also. Then also its not coming. Total is showing for last group only. 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 08 Jun 2012 at 4:50am
just remember, every time you print a detail, the value in the subreport changes...so that might part of your issues.
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 11 Jun 2012 at 1:48am
Is the subreport linked on Group ID?
IP IP Logged
sandesh
Newbie
Newbie


Joined: 05 Jun 2012
Location: India
Online Status: Offline
Posts: 4
Quote sandesh Replybullet Posted: 11 Jun 2012 at 2:20am
No sub report are not linked on group id. its on normal details link.
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