Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: simple passing of a summed field Post Reply Post New Topic
Author Message
celticpiping
Newbie
Newbie
Avatar

Joined: 25 Oct 2007
Online Status: Offline
Posts: 24
Quote celticpiping Replybullet Topic: simple passing of a summed field
     Posted: 17 Jul 2013 at 4:05am
The problem:
I need to pass the value of a summary field from my subreport to the main report.
 
What I tried:
I created a shared numbervar on the subreport:
Shared NumberVar chargebackVal := Sum ({@chargeback})
 
Then, in main report, I created formula:
Shared NumberVar charbackMainReportVal;
charbackMainReportVal
 
I get no value when I run the report
 
help good peoples !
 
Thanks much,
Rich
Dead
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jul 2013 at 4:28am
a trouble shooting process.
1-when you run the sub report do you get the expected value?
2-is the sub report set to run in a section above/before the location of the main report shared variable? The main report use has to exist after the sub report is run. (E.g. subreport in GHa, shared variable in GHb)
3 - is the subreport (or its section) suppressed? Suppressed sub reports do not run


Edited by DBlank - 17 Jul 2013 at 4:30am
IP IP Logged
celticpiping
Newbie
Newbie
Avatar

Joined: 25 Oct 2007
Online Status: Offline
Posts: 24
Quote celticpiping Replybullet Posted: 17 Jul 2013 at 4:30am
I think your point#2 is what's getting me..
lemme re-design & retest!
 
IP IP Logged
celticpiping
Newbie
Newbie
Avatar

Joined: 25 Oct 2007
Online Status: Offline
Posts: 24
Quote celticpiping Replybullet Posted: 17 Jul 2013 at 4:37am
I was able to pass a value to main report, but only a static value, as in 123
I cannot get my summary field to pass...
I have moved the desired shared numbervar formula field in a new footer below the subreport..
 
thoughts?
R
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jul 2013 at 6:21am
in the sub report
you have
 
Shared NumberVar chargebackVal;
chargebackVal := Sum ({@chargeback})
 
and it displays the correct value isnide the subreport when the subreport is run?
IP IP Logged
celticpiping
Newbie
Newbie
Avatar

Joined: 25 Oct 2007
Online Status: Offline
Posts: 24
Quote celticpiping Replybullet Posted: 17 Jul 2013 at 9:18am
sorry for the delay
whoops!
I just dragged the formula onto the subreport, into a hidden header..
and it now populates the value on the mailn report.
I guess I didn;t realize you need the formula to be ON the subreport....
:O
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