Page 1 of 1

FastReport and TfrxIBDACTable

Posted: Wed 03 Nov 2010 13:57
by Fabrice
Hello,

In FastReport , TfrxIBDACTable.TableName is always empty.
With IBX component TfrxIBDACTable.TableName list all the tables available.
TfrxIBDACTable work if you enter manually a table name.

Tested with last build of Fast report (4.10.1), IBdac (3.5.0.17) and Delphi 2010 pro.


To help you I think that something is missing in frxIBDACComponents.pas :

Code: Select all

  TfrxEngineIBDAC = class(TfrxEngineDAC)
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    procedure ReadFieldList(const ATableName: string; var AFieldList: TfqbFieldList); override;
procedure ReadTableList(ATableList: TStrings); override; // <= This is missing ?
  end;

and in frxIBDACEditor.pas :

Code: Select all

  TfrxIBTableNameProperty = class(TfrxTableNameProperty)
  public
    function GetAttributes: TfrxPropertyAttributes; override; // <= this missing
    procedure GetValues; override;
    procedure SetValue(const Value: String); override; // <= this missing
  end;

Best regards,

Posted: Thu 04 Nov 2010 06:47
by AndreyZ
Hello,

Thank you for the information. We have reproduced this problem and fixed it. This fix will be included in the next IBDAC build.
To solve the problem you can change the following code in the frxIBDACEditor.pas file:

Code: Select all

  frxPropertyEditors.Register(TypeInfo(String), TfrxIBDACTable, 'TableName',
    TfrxTableNameProperty);
to this code:

Code: Select all

  frxPropertyEditors.Register(TypeInfo(String), TfrxIBDACTable, 'TableName',
    TfrxIBTableNameProperty);

Posted: Thu 04 Nov 2010 10:53
by Fabrice
Hello Andreyz,

Thank you for your quick and efficient answer as usually.

I think this missing too for the "Fast Query Builder Designer" of Fastreport :
.....
TfrxEngineIBDAC = class(TfrxEngineDAC)
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure ReadFieldList(const ATableName: string; var AFieldList: TfqbFieldList); override;
procedure ReadTableList(ATableList: TStrings); override; // <= add this
end;

.....

// add this
procedure TfrxEngineIBDAC.ReadTableList(ATableList: TStrings);
begin
ATableList.Clear;
FQuery.connection.GetTableNames(ATableList, ShowSystemTables);
end;
Best regards,

Posted: Fri 05 Nov 2010 10:30
by AndreyZ
Thank you for your inquiry.
We already have the ReadTableList function in the TfrxEngineDAC class of the frxDACComponents unit.