in my app i use many Reports.
(I am still in the process of moving to RemObjects.)
I use following code to prepare 5 MemDataTable as Datasource for my Report.
If i call the Report it takes about 30 Seconds until the Report shows up…
( In my Offline App i used FibPlus with Firebid and there the same to 2,5 Sec )
There are about 110 Rows in the MainTable and very few on the Detail Tables,
There almost no BLOBS ( Textfileds ) in the Tables.
Is this normal?
Thank you for any Tipps
Manfred
procedure TDM_hotel.print_all_detail(Sender: TObject);
var
lDynWhere: TDAWhereBuilder;
e1,e2,e3: TDAWhereExpression;
begin
if camp_ident_part = '' then
begin
ClientDataModule.RemoteDataAdapter.FillWithDASql(DM_reports.tbl_rep_camps,'SELECT * FROM CAMPS');
with DM_reports.tbl_rep_camps do
begin
Close;
lDynWhere := DynamicWhere;
lDynWhere.Clear;
lDynWhere.Expression := lDynWhere.NewBinaryExpression('','ZONE_NO',dboGreater,'0');
IndexFieldNames := 'CITY';
Open;
end;
end
else
begin
ClientDataModule.RemoteDataAdapter.FillWithDASql(DM_reports.tbl_rep_camps,'SELECT * FROM CAMPS');
with DM_reports.tbl_rep_camps do
begin
Close;
lDynWhere := DynamicWhere;
lDynWhere.Clear;
e1 := lDynWhere.NewBinaryExpression('','C_NO',dboEqual,camp_ident_part);
e2 := lDynWhere.NewBinaryExpression('','ZONE_NO',dboGreater,'0');
lDynWhere.Expression := lDynWhere.NewBinaryExpressionList([e1,e2], dboAnd);
IndexFieldNames := 'CITY';
Open;
end;
end;
ClientDataModule.RemoteDataAdapter.FillWithDASql(DM_reports.tbl_rep_default,'SELECT * FROM HOTEL');
with DM_reports.tbl_rep_default do
begin
Close;
lDynWhere := DynamicWhere;
lDynWhere.Clear;
// lDynWhere.Expression := lDynWhere.NewBinaryExpression('','ID',dboEqual,frm_hotel.ID.Field.DisplayText);
IndexFieldNames := 'NAME';
Open;
end;
ClientDataModule.RemoteDataAdapter.FillWithDASql(DM_reports.tbl_rep_default_c,'SELECT * FROM HOTEL_C');
with DM_reports.tbl_rep_default_c do
begin
Close;
lDynWhere := DynamicWhere;
lDynWhere.Clear;
lDynWhere.Expression := lDynWhere.NewBinaryExpression('','STAT_DEL',dboEqual,'0');
IndexFieldNames := 'C_NAME';
Open;
end;
ClientDataModule.RemoteDataAdapter.FillWithDASql(DM_reports.tbl_rep_default_d,'SELECT * FROM HOTEL_D');
with DM_reports.tbl_rep_default_d do
begin
Close;
lDynWhere := DynamicWhere;
lDynWhere.Clear;
lDynWhere.Expression := lDynWhere.NewBinaryExpression('','STAT_DEL',dboEqual,'0');
IndexFieldNames := 'D_DATE';
Open;
end;
ClientDataModule.RemoteDataAdapter.FillWithDASql(DM_reports.tbl_rep_default_dd,'SELECT * FROM HOTEL_DD');
with DM_reports.tbl_rep_default_dd do
begin
Close;
lDynWhere := DynamicWhere;
lDynWhere.Clear;
lDynWhere.Expression := lDynWhere.NewBinaryExpression('','STAT_DEL',dboEqual,'0');
IndexFieldNames := 'BIBLE_TYPE';
Open;
end;
report_file := 'report_dist.fr3';
report_var_name := '''' + frm_hotel.Caption +'''';
DM_reports.print_dist(Sender);
end;
if camp_ident_part = '' then
begin
ClientDataModule.RemoteDataAdapter.FillWithDASql(DM_reports.tbl_rep_camps,'SELECT * FROM CAMPS');
with DM_reports.tbl_rep_camps do
begin
Close;
lDynWhere := DynamicWhere;
lDynWhere.Clear;
lDynWhere.Expression := lDynWhere.NewBinaryExpression('','ZONE_NO',dboGreater,'0');
IndexFieldNames := 'CITY';
Open;
end;
end
else
begin
ClientDataModule.RemoteDataAdapter.FillWithDASql(DM_reports.tbl_rep_camps,'SELECT * FROM CAMPS');
with DM_reports.tbl_rep_camps do
begin
Close;
lDynWhere := DynamicWhere;
lDynWhere.Clear;
e1 := lDynWhere.NewBinaryExpression('','C_NO',dboEqual,camp_ident_part);
e2 := lDynWhere.NewBinaryExpression('','ZONE_NO',dboGreater,'0');
lDynWhere.Expression := lDynWhere.NewBinaryExpressionList([e1,e2], dboAnd);
IndexFieldNames := 'CITY';
Open;
end;
end;