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

Passing Shared Variables to SubReports

Status
Not open for further replies.

Theadmans

Programmer
Oct 23, 2006
35
GB
Hi, I am using Crystal 8 and have a Main Report which has a formula which is used for record selection in this Main Report. The value of this Formula is updated by my calling VB application so I can choose what record selction I require.

I have now added a SubReport to the Main Report which needs to use the same formula value as the Main Report for record selection. I have setup a Shared variable which I can print out on the Subreport. However, when I try to use this Shared variable in the SubReport Record Selection Formula I get "The formula cannot be used because it must be evaluated later".

Is there any way round this problem or is there another method I could use eg. Parameters (which I have not used these before).

Many Thanks.
 
You should be linking the sub to the main instead of using shared variables. What is the record selection formula in the main report?

-LB
 
Thanks IBass - I had forgotten all about SubReport Links for some reason! I have now got it working by using the links - thanks very much - you're a star.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top