Home Server
New Blog Posts: Merging Reports - Part 1 and Part 2

Determine Connection Instance

edited February 2003 in Server
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.

Comments

  • edited February 2003

    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
This discussion has been closed.