Displaying parametric information in a report

edited April 2012 in End User

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

Many thanks

--- posted by geoForum on http://www.newswhat.com


  • edited April 2012

    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\...

    Best Regards,

    Nico Cizik
    Digital Metaphors
  • edited April 2012
    Hello Nico,

    Yes, very obvious when you look at it.

    Thank you for your help.

    Best regards

    --- posted by geoForum on http://www.newswhat.com
This discussion has been closed.