Determine Connection Instance
Is there a way to get the Instance of the Database connection object for the
report. In my case I am using DBExpress. I need to create a pass-thru
function that can be called when running the report either directly from the
client (when designing) or from the Server the will run a query.. So I need
a way to determine the database connection that the report is using, so I
can use the same connection to run my query.
report. In my case I am using DBExpress. I need to create a pass-thru
function that can be called when running the report either directly from the
client (when designing) or from the Server the will run a query.. So I need
a way to determine the database connection that the report is using, so I
can use the same connection to run my query.
This discussion has been closed.
Comments
The TDataModule upon which the ReportVolume resides is the Owner of the
Report and the Database connection objects. Therefore you could pass the
Report object reference to the RAP pass-through function. Then get the
Report.Owner and search thru its Components[] array to extract the database
connection. Or if you know the name of the connection object, you can use
Owner.FindComponent('componentname').
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com