Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

How do I add parameter values to the Header?

I have a report with two parameters. Start Date & End Date.
The User enters the dates in the Preview courtesy of AutoSearch.
I want to show the dates entered for the Parameters in the Header but I can't figure out how to retrieve them.
Any assistance appreciated.
Ian

Comments

  • Hi Ian,

    In the Header.BeforePrint, set the caption of a label to the value of the report parameter.

    ppLabel2.Caption := ppReport1.Parameters['Parameter1'].Value;
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2019
    Thanks Nico.
    So I added..
    procedure HeaderBeforePrint; begin Label5.Caption := Report.Parameters['StartDate'].Value; end;
    but I get a "Error: HeaderBeforePrint, Line 3: Expected:'(' or '[' but found 'value' instead." message :-(

    Regards,
    Ian
  • OK sorted. Doesn't need the .Value on the end.
    Cheers.
    Ian
  • Can I use this Report Parameter for my user SQL?
    In our software I can use only @KOD variable, which is not documented in Report Designer.
Sign In or Register to comment.