How to access a RAP-function in the report in delphi dynamically?
How to access a RAP-function in the report in delphi dynamically?
Hi,
If I define a AutoSearch-Expression such as "@GetAktDate" and
write in this report a global function:
Function GetAktDate:String;
begin
Result:=DateTostr(now);
end;
I would like to find a solution to call this function in delphi by the
function name e.g. "getAktDate"
may be Report.CallMethod('GetAktDate',....) ???
best regards,
Michael
Hi,
If I define a AutoSearch-Expression such as "@GetAktDate" and
write in this report a global function:
Function GetAktDate:String;
begin
Result:=DateTostr(now);
end;
I would like to find a solution to call this function in delphi by the
function name e.g. "getAktDate"
may be Report.CallMethod('GetAktDate',....) ???
best regards,
Michael
This discussion has been closed.
Comments
There is no way to call a RAP function from Delphi code. Perhaps when you
write the RAP pass-thru function, it can call a custom Delphi function. That
way both Delph code and RAP code can call the function. In your example, you
can simply call DataToStr(Now) directly from the Delphi code.
There is no way to embed a function call as an autosearch expression. The
@GetAktDate will not be converted to a date. You can use the
Report.OnGetAutoSearchValues event to specify the
Report.AutoSearchFields[].SearchExpression property.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com