Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Shared Variables Post Reply Post New Topic
Author Message
solent
Newbie
Newbie


Joined: 07 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 22
Quote solent Replybullet Topic: Shared Variables
    Posted: 06 Jun 2008 at 8:02am

Hello,

 
Is it possible to share a variable between two subreports that are contained on one main report ?
 
Example:
 
Sub Report 1 has a formula field = Total Entered
Sub Report 2 has a formula field = Total Placed
 
On Sub Report 2 I want to show Total Entered - Total Placed
 
Thanks
IP IP Logged
MaddMatt
Newbie
Newbie
Avatar

Joined: 18 Feb 2008
Location: United Kingdom
Online Status: Offline
Posts: 17
Quote MaddMatt Replybullet Posted: 10 Jun 2008 at 4:01am
It certainly is.
 
in subreport 1, in your formula field declare a shared variable:
 
              Shared Numbervar TotalEntered;
 
and have your variable equal the result of your formula:
 
              TotalEntered := formula
 
in subreport 2, you can then reference your shared variable:
 
              Shared Numbervar TotalEntered;
 
              TotalEntered - {@TotalPlaced}
 
Hope that helps.


Edited by MaddMatt - 10 Jun 2008 at 4:51am
There are 10 types of people. Those that understand binary, and those that don't.
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.014 seconds.