FastReport and TfrxIBDACTable

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Fabrice
Posts: 45
Joined: Tue 07 Sep 2010 09:44

FastReport and TfrxIBDACTable

Post by Fabrice » Wed 03 Nov 2010 13:57

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,

AndreyZ

Post by AndreyZ » Thu 04 Nov 2010 06:47

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);

Fabrice
Posts: 45
Joined: Tue 07 Sep 2010 09:44

Post by Fabrice » Thu 04 Nov 2010 10:53

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,

AndreyZ

Post by AndreyZ » Fri 05 Nov 2010 10:30

Thank you for your inquiry.
We already have the ReadTableList function in the TfrxEngineDAC class of the frxDACComponents unit.

Post Reply