Access database through RAP functions
Hi,
I would like to add a function to RAP that is able to execute a query in
the database, but I am wondering how to get access to the main dataset of
the report.
I plan to use the 'IProviderSupport' interface of the dataset to gain a
unified access to the currently connected database.
Do you have any suggestions on teh best way to handle this?
--
Jens Dein
I would like to add a function to RAP that is able to execute a query in
the database, but I am wondering how to get access to the main dataset of
the report.
I plan to use the 'IProviderSupport' interface of the dataset to gain a
unified access to the currently connected database.
Do you have any suggestions on teh best way to handle this?
--
Jens Dein
This discussion has been closed.
Comments
Pass the Report as a parameter to the RAP function
function GetDataSet(aReport: TppReport): TDataSet;
begin
if (aReport.DataPipeline <> nil) and (aReport.DataPipeline is
TppDBPipeline) then
Result := TppDBPipeline(aReport.DataPipeline).DataSource.DataSet
else
Result := nil;
end;
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
http://www.digital-metaphors.com
info@digital-metaphors.com