Subject |
Re: Passing parameters from form to report |
From |
Mervyn Bick <invalid@invalid.invalid> |
Date |
Tue, 9 Feb 2016 17:01:33 +0200 |
Newsgroups |
dbase.getting-started |
On 02/09/2016 12:58 PM, Bob grimes wrote:
> thanks very much for the above Mervyn
>
> You really have helped me to understand the way that parameters can be passed from a form to a report that is loaded into memory by the form.
> As I understand it the parameters to be used are setup in the original form query and values are assigned to them there.
> These parameter values can then be changed by an event on the form , on_click ,on_change etc.
> The code in the event handler then changes some or all of the parameters and the query is requeryied.
> The report is then rendered.
> I presume that I can use memory variables instead of object values where necessary.
The values for the parameters can come from whatever is convenient to
you, the programmer. Entryfields, rowset, variables, properties, wherever.
Variables have their place (you have to use them if you want to use
macro expansion for instance) but with OOP programming it is perhaps
better to only use local variables withing functions or event handlers
(which are functions anyway) and use user-defined properties of the form
or other objects for the rest.
> It does seem a good way to do the job
It is, of course, not the only way. It is, however, probably the most
flexible way. Other ways may be simpler but the trade-off is less
flexibility.
.
> Unfortunately I can't try it today as my laptop has gone down with a bug with cpu usage constantly 99% and memory usage constantly 80% hopefully it's not fatal
Sounds nasty. :-(
Mervyn.
|
|