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?
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.
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.
Comments
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
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
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