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!

How to pass a variable from form to report ?

Status
Not open for further replies.

andreateh

Programmer
Jul 19, 2003
83
SG
Is it possible to pass a variable from a form to report ?

I try declare a public variable. And then from the report access the variable. It work. But does it have other way ?
 
Report doesn't have a "With" clause. So you use a right way.
You can also create a special table with some of parameters and use it's values in report for conditioning.

Juri

Juri Shutenko
Municipality of Maardu, Estonia
 
The variable does not HAVE to be public.

As the report becomes a 'child' of the code that called it, PRIVATE variables are 'in scope' for reports.

HTH

Regards

Griff
Keep [Smile]ing
 
Thanks for help. Both of you have give me some idea.


 
You can also add the variables as properties to _SCREEN object with

_SCREEN.AddProperty("MyVar", MyValue)

and release them after closing the report, but I don´t see the difference. Any thought?



Gerardo Czajkowski
ltc.jpg
 
I think having private variables in the report's scope
will be faster, since any reference to the _screen object;
or any other object for that matter; will garner a
performance hit.

But, once again, objects are magic!

I love them...


Darrell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top