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

Passing parameters to TraProgram in Delphi

edited June 2005 in RAP
Hi,

I want to be able to pass a parameter value to a TraProgram instance and
execute it. I saw SetParameterValue, that takes a integer and a TraValue...
How do I use it?

David

Comments

  • edited June 2005

    See RBuilder\Demos\RAP\ for examples and tutorials of how to do this. The
    tutorials are included in the RBuilder\Developers Guide\RBuilder.pdf.

    (We are researching the other issue that reported above...)


    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited July 2005
    Sorry, I think I wasn't clear enough.

    I meant that I would like to call a RAP function from Delphi, like this :

    var
    MyProgram: TraProgram;
    MyResult: string;
    begin
    MyProgram := Report.CodeModule.FindProgram('MyProgram');
    //** Set the parameters function **//
    MyResult := MyProgram.Execute.AsString;
    end;

    I'm doing this successfully with parameter-less functions, but I'd like to
    know how to set Parameter values.

    David


  • edited July 2005

    What are you trying to accomplish?

    We do not have any examples of calling RAP programs from Delphi.

    The ReportBuilder source code contains numerous examples of components such
    as Label and DBText that fire RAP event-handlers by sending an
    event notification. And these notifications can contain parameters required
    by the event-handler. But this is very different than directly calling a RAP
    program.

    For example, a RAP TraEventHandler can establish a relationship with a Label
    to be notified when the Label.OnPrint event occurs. When notified, the
    TraEventHandler executes the code written by the end-user.



    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.