Home RAP

Access Report Parameters

edited March 2003 in RAP
I'm trying to use report parameters in RB 7.02 (build 2) / Delphi 6 SP2 /
Reports stored in Oracle 7.3


From the client side I have:

trsClientReport1.ReportParameters.Clear;
trsClientReport1.ReportParameters.Add('Title',dtString,'The Report
Heading');
trsClientReport1.ValidateReportParameters;


In the Server:
I have not assigned anything to ValidateReportParameters. I don't need
to check anything.


In the RAP BeforePrint event I have:

Title1.Caption := Report.Parameters['Title'];


No errors but the parameters do not transfer, nothing shows in the Title1
label.

What am I missing?


Thanks! Jon Gray

Comments

  • edited March 2003
    Try creating the parameters statically in the report as the first test
    before trying to add them dynamically to the report. See the
    TrsClientReport.ReportParameters
    topic in the RB Server help file. Essentially, if you want to add a
    parameter on a report at runtime, then add it on the server side before the
    report begins generating. Check out the OnGetReportParameters event on the
    ReportVolume object in our help file. This is the timing to use to specify
    the parameters on the server side. Perhaps we need to add a new event to
    RAP, such as TemplateLoadEnd so that you can create the parameters in RAP
    before the report begins generating.

    The parameter demos work by retrieving the parameters from the server. They
    aren't created on the client side. Perhaps start with the parameters demo
    and extent it to do what you are trying to accomplish with your parameters
    by taking a static approach. Then you can try creating them dynamically.
    That should make the learning process go a little easier:)

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.