Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

fastreport / composite / multiple data sources

1,145 views
Skip to first unread message

Stewart Bourke

unread,
Jun 16, 2003, 9:29:15 AM6/16/03
to
I have managed now to get the various report layouts working,and now want to
combine them into a single report.

I have three seperate reports, with different layouts, but working with the
same datasource structure - just different query params to give different
result sets for each printer.

Assuming I have 3 report datasets, each with a different query, how di I
combine them into one report, whilst modifying the query for each one to
return the correct result sets.

e.g. Full Printed document =:
Page 1 - loaded from c:\forms\layout75.frf
Page 2 - loaded from c:\forms\layout76.frf
Page 3 - loaded from c:\forms\layout77.frf

I have created a compisute report, and added the 3 reports to the composite
report - my problem is I do not know how to change/fire the queries that
feed the report datasources at runtime.

Thanks,

Stewart Bourke

Michael Philippenko

unread,
Jun 16, 2003, 10:15:48 AM6/16/03
to
Dear Stewart Bourke!

Use own internal TfrBDEQuery for each of reports.

"Stewart Bourke" <stewart...@infosol.ie> wrote:
news:3eedc634$1...@newsgroups.borland.com...


--
Best regards,
Michael Philippenko mailto:in...@fast-report.com
FastReport Software - advanced reporting tools for Delphi, C++Builder,
Kylix
http://www.fastreport.org
http://www.fast-report.com


Stewart Bourke

unread,
Jun 17, 2003, 2:44:18 AM6/17/03
to
Michael,

Thank you for that.

First, I am using IBO, so I do not think the bdequery will do.

I am using tqueries linked to tfrdatasets, for each report.

My problem is that I do not know when to assign the query values, and where.

If the reports are all added before I prepare the reports, how do I modify
the queries for each report in turn. My problem is that the query from one
later report coul dbe affected by an earlier report, so I need to be able to
modify the query for each report before it runs.

would you have any examples of bullding composite reports, with the queries
in some reports being modified at runtime?

Thanks,

Stewart Bourke

"Michael Philippenko" <in...@fast-report.com> wrote in message
news:3eed...@newsgroups.borland.com...

Michael Philippenko

unread,
Jun 17, 2003, 10:30:37 AM6/17/03
to
Dear Stewart Bourke!

You can't modify dynamically SQL property in TQuery and activate your
datasets before Prepare report?

"Stewart Bourke" <stewart...@infosol.ie> сообщил/сообщила в новостях
следующее: news:3eeeb8ca$1...@newsgroups.borland.com...

Stewart Bourke

unread,
Jun 17, 2003, 11:57:36 AM6/17/03
to
Michael,

yes I can.

It is probably that I am not explaining correctly and also I do not really
understand what the composite report is doing.

I want to achieve the following:

1. Load report from file, set query params and print the report
2. Load a second report from file, and, based on some logic, also set the
query params for the second report, which will then be printed.

My questions therefore are:

1. In a composite report, when are the queries for each report
opened/evaluated?
2. If I create the tfrreport dynamically, must I also create the report
datasets dynamically for each report, or can I use the same datasets for all
reports, but by modifiying the SQL of the queries?

Thanks,

Stewart Bourke

"Michael Philippenko" <in...@fast-report.com> wrote in message

news:3eef...@newsgroups.borland.com...

Stewart Bourke

unread,
Jun 22, 2003, 1:43:45 PM6/22/03
to
Michael,

Could you please confirm how this can be done?

THanks,

Stewart Bourke

"Stewart Bourke" <stewart...@infosol.ie> wrote in message
news:3eef3a79$1...@newsgroups.borland.com...

Michael Philippenko

unread,
Jun 24, 2003, 8:30:40 AM6/24/03
to
Dear Stewart Bourke!

Sorry for delay.
You can write to my mail or to sup...@fast-report.com for fast reply.

> 1. In a composite report, when are the queries for each report
opened/evaluated?


Each report starts to address to dataset during prepearing.

> 2. If I create the tfrreport dynamically, must I also create the report
> datasets dynamically for each report, or can I use the same datasets for
all
> reports, but by modifiying the SQL of the queries?


You can use any of these variants.

Also you can do this (easy way):

Prepare first report (with own query), save .frp, prepare second report
(with own query), save .frp

begin

R1.LoadPreparedReport('file1.frp');

R2.LoadPreparedReport('file2.frp');

CompositeReport.Reports.Clear;

CompositeReport.Reports.Add(R1);

CompositeReport.Reports.Add(R2);

CompositeReport.ShowPreparedReport;

end;

or

begin

R1.LoadPreparedReport('file1.frp');

R2.LoadPreparedReport('file2.frp');

R1.EMFpages.AddFrom(R2);

R1.ShowPreparedReport;

end;


Or withoout saving (R1 and R2 - reports):

begin
R1.Prepare;

R2.Prepare;

R1.EMFpages.AddFrom(R2);

R1.ShowPreparedReport;

end;


"Stewart Bourke" <stewart...@infosol.ie> wrote:
news:3eef3a79$1...@newsgroups.borland.com...

http://www.fastexperts.com
http://www.fast-report.com

0 new messages