Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Passing running totals from sub report to main rep Post Reply Post New Topic
Author Message
molson
Newbie
Newbie


Joined: 06 May 2008
Location: United States
Online Status: Offline
Posts: 1
Quote molson Replybullet Topic: Passing running totals from sub report to main rep
     Posted: 06 May 2008 at 11:08am
I am trying to do a management summary that is calculating days in custody (jail) for a person on the subreport, then passing all these to the main report and using them in a cross tab.
Is this even possible?
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 08 May 2008 at 9:19am
Hmm.  I'm not entirely sure about using them in a crosstab.  That might stretch the capabilities of Crystal a bit.

You do know how to use shared variables, yes?  That's how you move information between a main report and a subreport.  If not, go do some reading on that topic in the help file and in Brian's book.

Once you've got the shared variables set up, it then becomes a timing issue.  Can you collect all the information into the formulas before Crystal needs to calculate the crosstab report?  I'm not entirely sure.  I'd have to experiment to be able to give you an answer.


IP IP Logged
imstillfishing
Newbie
Newbie
Avatar

Joined: 09 May 2008
Location: United States
Online Status: Offline
Posts: 11
Quote imstillfishing Replybullet Posted: 10 May 2008 at 6:52am

I'm pretty sure you can do this In the display text option of your totals, create a shared varable like so.

shared currencyvar TotalX := {your running total};
ToText({your running total},2);
 
In your main form, you create a forumal if you want it displayed
in your report by putting
shared currencyvar TotalX;
as its value.
 
If necessary, you may need to reset your varable before the next instance of your sub report runs.
To do this, again use the display text of a field in the main report which is run before your sub report.
shared currencyvar TotalX := 0;
ToText('what ever your field name is');
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