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

Using Shared Variables in Record Selection

Status
Not open for further replies.

bob7218

Programmer
Feb 20, 2003
3
0
0
US
I am attempting to use a shared variable in a subreport as the basis for record selection in the subreport.

In the subreport I have a formula
@start_time where the forumla is shared datetimevar start.

The start variable is passed properly; however in the subreport select formula, when I attempt to use @start_time, I receive the message that this formula can't be used because it must be evaluated later. I also noticed that when I attempt to use the record selection formula editor that the @start_time formula is not available for use (I assume because of the error mentioned previously).

Thus I'd like to know the proper way of passing a datetime variable from a main report to a subreport and then using that variable in the record selection formula of the subreport.

Thanks in advance for the assistance.
 
I'm pretty sure you can't do that. Perhaps you could reverse your report. Make the subreport the main, and pass info to what is now the main report? Without knowing more it's hard to tell if this would be viable in your case.
 
I wouldn't pass this as a shared variable. The reason you get the error is because the shared variable in the subreport isn't evaluated until the report is created, which requires a dataset.

You *can* link to some formulas (not the enclose variable but the formula output itself). Try creating a formula with the shared variable as the output, and using that to link in your subreport.

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top