Displaying parametric information in a report
?Hi,
I am presenting the user with a form containing parameter information,
in this case From and To dates. I then build a query which I pipelne
into the report. All fine.
However, I want to pass in those parameters so that I can display them
in the header (e.g. From: 12-Jan-2011 To: 14-Jan-2011), but can't work
it out. I have tried creating variables, and attempting to populate
them in OnBeforePrint (e.g. ppReport1.Variable1 := '12-Jan-2011') but
the variables aren't published/public.
I am sure it is really easy, but I can't figure it out. Can anyone help
please?
Many thanks
--- posted by geoForum on http://www.newswhat.com
I am presenting the user with a form containing parameter information,
in this case From and To dates. I then build a query which I pipelne
into the report. All fine.
However, I want to pass in those parameters so that I can display them
in the header (e.g. From: 12-Jan-2011 To: 14-Jan-2011), but can't work
it out. I have tried creating variables, and attempting to populate
them in OnBeforePrint (e.g. ppReport1.Variable1 := '12-Jan-2011') but
the variables aren't published/public.
I am sure it is really easy, but I can't figure it out. Can anyone help
please?
Many thanks
--- posted by geoForum on http://www.newswhat.com
This discussion has been closed.
Comments
The report components are not properties the report itself, they are
separate Delphi components.
From Delphi, instead of trying to assign Report.Variable1.Value, you
would simply assign ppVariable1.Value := Date.
I also suggest taking a look at the AutoSearch feature of ReportBuilder.
This essentially preforms the same task you are doing below
automatically. See the autosearch demos located in the \Demos\...
directory.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Yes, very obvious when you look at it.
Thank you for your help.
Best regards
Keith
--- posted by geoForum on http://www.newswhat.com