Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Accessing Sub-Report Data Post Reply Post New Topic
Author Message
cyber-guys
Groupie
Groupie


Joined: 02 May 2008
Online Status: Offline
Posts: 42
Quote cyber-guys Replybullet Topic: Accessing Sub-Report Data
    Posted: 06 Jan 2010 at 12:00pm
I have a report that generates cash drawer info, ie, start, end balances, deposits  & total paid out.  The same report has a subreport that calculates the total $ value of invoices by cash, check & AP.
 
I would like to take the cash invoice total from the subreport and subtract it from the calculated payout from the cash drawer report giving cash drawer shortage/overage. 
 
I'm guessing I need to create a formula using a variable to hold the subreport data but I have no clue where to start.
 
Any help would be greatly appreciated.
 
Thanks in advance,
Cyber-guys
 
PS - this forum is the BEST !!!
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 07 Jan 2010 at 8:36am
Look up shared variables.  You would need to create a shared variable in the sub-report (in a formula) and then you can use that same (it needs to be defined) in the main report.
IP IP Logged
cyber-guys
Groupie
Groupie


Joined: 02 May 2008
Online Status: Offline
Posts: 42
Quote cyber-guys Replybullet Posted: 08 Jan 2010 at 5:15am
THANK YOU KEVLRAY ! ! !
 
I couldn't figure out how to get just the cash sum from the subreport so I created another subreport that selected only cash info.
 
I was then able to display the shared data in the subreport OK but couldn't get it to work in the main report.  I found that if I moved the subreport to the header it worked.  I don't need to display the contents of the extra subreport so I suppressed those fields & the report is working fine.
 
Obviously the issue was the order in which CR selects & processes data - is there any way to force the process in order to show data in the main report from a subreport located in a footer.  I have other reports that I need to do this with & I don't think my workaround will work.
 
Thanks again,
Cyber-guysSmile
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.015 seconds.