Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Problem passing shared variable from subreport Post Reply Post New Topic
Author Message
jpleau
Newbie
Newbie


Joined: 02 Sep 2010
Online Status: Offline
Posts: 2
Quote jpleau Replybullet Topic: Problem passing shared variable from subreport
     Posted: 02 Sep 2010 at 6:38am
I have set up a shared string variable in a subreport, another in a main report, and a variable reset in main repot. I have put the variable reset in GHa, subvariable in GHb, and the mainvariable in GHc.
 
Many of the shared variables are blank, when the first populated variable is reached, all blank records below are popluated with the information from the first record, until the next record with data is reached, then it will continue with that info, until another is found.  So I am not seeing any blank records once the first populated variable is reached.
 
What steps am i missing?
 
TIA for any assistance,
 
Jill
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 03 Sep 2010 at 3:36am
perhaps you need to reset the shared variable before the call to the subreport
 
HTH
IP IP Logged
MrCastalum
Newbie
Newbie
Avatar

Joined: 11 Mar 2010
Location: United Kingdom
Online Status: Offline
Posts: 22
Quote MrCastalum Replybullet Posted: 06 Sep 2010 at 4:38am
that's right, I had the same problem on a VAT report I created, you just put the following formula before the next variable.

shared numbervar vat2 := 0;
"" //i do this to hide formula displaying 0
IP IP Logged
jpleau
Newbie
Newbie


Joined: 02 Sep 2010
Online Status: Offline
Posts: 2
Quote jpleau Replybullet Posted: 07 Sep 2010 at 2:58am

Thanks for the feedback.  The answer was in the reset variable.  I mistakenly referred to the variable as the name of the formula, rather then the name of the variable.  Once I straightened this out -- everything fell into place.

Thanks again for the help, forums are good!

Regards,

 

Jill

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