Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared string variable

Status
Not open for further replies.

elaineva

Programmer
Nov 14, 2002
35
US
I created a Shared StrVariable in my subreport - link to the main report and display this subreport on my main report. When I look at this text field on the main report(from the subreport) - it is correct. I then created a Shared StrVariable in the main report and show that on the main report. It is correct and matches the subreport field - EXCEPT - if the str for that record is blank - then it pulls the last entry from the previous record.

Any suggestions??
 
Sounds like a reset issue of the shared variable.

Create the shared variable prior to executing the subreport, as in:

whileprintingrecords;
shared stringvar MyText := ""

and suppress it.

Now the variable is reset to blank so if the subreport doesn't update the variable, it's been set to blank.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top