Home Datapipelines

Getting Fields/Tables from Interbase based Report

edited November 2002 in Datapipelines

I have an Interbase based app with an End-Usert report solution. The reports
are stored in the interbase database. Now I want to change the
autosearchfields @ runtime. Because I've created my own AutoSearchDialog
(the same dialog we use for filtering and stuff in the app) where all tables
and fields of the Report have to be loaded. When I try to get to the
fieldlist using the Fields collection of the Datapipeline of the report I
get the SQL names (ending with _1 and up). I need the real tables and
fields. Is there a way to get these fields? I know that it's possible cause
RB does the exact same thing in the designer.

Thanks in advance


  • edited December 2002
    You can get the table names and field names by extracting the TdaSQL object
    and reading the selected table and fields form those table. Look in
    daSQL.pas. There are two properties for the selected tables.

    property SelectTableCount: Integer read GetSelectTableCount;
    property SelectTables[aIndex: Integer]: TdaTable read GetSelectTable;

    Onceyou have the TdaTable object, you can read the RawTableName proeprty to
    get the actual table name.

    You can do a similiar thing for the fields:

    property SelectFieldCount: Integer read GetSelectFieldCount;
    property SelectFields[aIndex: Integer]: TdaField read GetSelectField;

    Here is a demo which shows how to extract a TdaSQL object. There is one
    TdaSQL object in every dataview instance for a report, so you may have to
    loop through the dataviews array property shown in the demo to get all of



    Jim Bennett
    Digital Metaphors

This discussion has been closed.