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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help displaying shared var

Status
Not open for further replies.

MrHelpMe

Technical User
May 1, 2001
203
CA
Hello,

I have encountered a problem with a crystal report that I was wondering if you could help me with. Two subreports were added to a main report (Foreign STN Current Value and Foreign STN Prior Value) and created two shared variable formulas (STN Prior Value and STN Current Value) in the master report. The shared variables are not displaying any information when I hide all the sections in the sub-report and run the report for multiple portfolios (I ensured that I placed the sub-report in a section of the master report that is not being suppressed). When I run the report for one portfolio (WORLD) the information passes successfully. Your help is greatly appreciated. Thanks. Using Crystal 8.0.
 
Location of the subs is critical, and if you're resetting the shared variable value anywhere.

Place the shared variable in a section right after the subreport to see what it is returning.

If you need further help, please include where the shared variable is in the main, if there are groups, and if you're restting the shared variable, and where.

-k
 
Hi synapsevampire and thanks for your reply.

I have created 2 subreports located in group header 2. In those subreports my shared variable is located in group footer 1 by this formula and they are suppressed(which is causing the problem)
shared numbervar stnprior:=Sum ({@STN Prior Value}, {PORTFOLIOS.PORTFOLIO})

Then I call those shared variables in the main report under Group footer 1 by the following formula
whileprintingrecords;
shared stringvar stnport;
shared numbervar stnprior;
if {PORTFOLIOS.PORTFOLIO}=stnport then stnprior

Not sure what you mean by resetting the variables but hope this all makes sense. Let me know. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top