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

How to access Report SQL result set?

edited February 2003 in General
Hi,

I want to be able to pull out email addresses that are returned as fields in
the SQL result set used to populate a report, as I want to email an exported
report to these addresses.

How do I access the report data (ideally as a TDataset object) ?

Delphi 5 / RB 7 / DOA

Thanks,

Mike Down

Comments

  • edited February 2003
    If you have a dataview in the Data tab of the report, then you can reference
    the dataset by working backwards using the fact that the report is connected
    to a datapipeline.

    lDataSource := TppDBPipeline(myReport.DataPipeline).Datasource;
    lDataset := lDatasource.Dataset;

    Then check to see if this data set IS a DOAQuery object, then typecast it
    and you'll have access to the normal runtime interface of a DOA data access
    component.

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.