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

Set Shared variable to a parameter ? 1

Status
Not open for further replies.
May 23, 2002
39
US
How do I set a parameter, within a Command, equal to a shared variable...or can I at all?

Main report has field called SettleDate.
Formula is: shared DateTimeVar ParamSettleDate:= tblW.SettleDate;

The subreport, which is a command, the formula is:
WhilePrintingRecords;
shared DateTimeVar ParamSettleDate

So I want to create a record selection, in the subreport, such that my parameter, ?ParamSettleDate = shared DateTimeVar ParamSettleDate
 
Why not simply use the main report field {tblW.SettleDate} as a linking field to the subreport date field?

You can't use shared variables in record selection formulas, but I don't think you need to. If you have a parameter in the main report, you could also create the same parameter in the subreport, set the parameter equal to the date field in the subreport record selection formula, and then link the two parameters to each other, using the dropdown in the lower left corner of the subreport linking screen.

-LB
 
Thank you lbass. I appreciate your answer. I thought about that, but I do not want to create a parameter in the main report...don't need it.
You answered my question about setting a parameter to a variable.
Will have to try some other code.

MANY THANKS!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top