Testing RAP function outside ReportBuilder
I'm trying to test RAP functions outside ReportBuilder. I create a
TraParamList and add a couple of parameters using AddParam,
CreateValuePointer and SetParamValue. However, when I call the
ExecuteFunction of the RAP class, I get an access violation when using
GetParamValue. When I test the code in ReportBuilder, everything is fine.
This is the calling code:
var
Param: string;
begin
ParamsList := TraParamList.Create;
Param := 'This is a param';
ParamsList.AddParam('FirstParam', daString, nil, '', False, False);
ParamsList.CreateValuePointer(0, Param);
ParamsList.SetParamValue(0, Param);
FmyRAPFunction.ExecuteFunction(aParams);
It falls over in the ExecuteFunction code:
GetParamValue(0, Param1);
Does anyone have any idea as to what might be going wrong?
Aaron.
TraParamList and add a couple of parameters using AddParam,
CreateValuePointer and SetParamValue. However, when I call the
ExecuteFunction of the RAP class, I get an access violation when using
GetParamValue. When I test the code in ReportBuilder, everything is fine.
This is the calling code:
var
Param: string;
begin
ParamsList := TraParamList.Create;
Param := 'This is a param';
ParamsList.AddParam('FirstParam', daString, nil, '', False, False);
ParamsList.CreateValuePointer(0, Param);
ParamsList.SetParamValue(0, Param);
FmyRAPFunction.ExecuteFunction(aParams);
It falls over in the ExecuteFunction code:
GetParamValue(0, Param1);
Does anyone have any idea as to what might be going wrong?
Aaron.
This discussion has been closed.
Comments
The ExecuteFunction routine cannot be called separate from the report
object. What exactly are you trying to accomplish. If this is a pass thru
function in Delphi, you should be able to test it using a simple report
example.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Aaron.