Chris:
If by "suitable" you mean forcing a page break on change of the master record, I can't help you - since I haven't figured that out yet. But if you just want something like:
Page Header
master
detail
detail
master
detail
detail
detail
etc
I did the following:
1) New Application:
2) Add ZConnection, ZQuery1, ZQuery2 - I use Firebird.
3) Add Datasource1, Datasource2
ZQuery1.SQL set to
select fld1, fld2, fld3 from dbfile1 order by fld1
ZQuery2.SQL set to
select fld1, fld2, fld3 from dbfile1 where fld1 = :fld1
ZQuery2.DataSource := DataSource1
4) Add DBGrid1, DBGrid2
- optional to see the relationship working.
5) Add frDBDataSet1, frDBDataSet2
frDataSet1.DataSet := ZQuery1
frDataSet2.DataSet := ZQuery2
6) Add frReport1, it didn't seem to matter which frDBDataSet I set the frReport1.DataSet to.
7) Add two buttons captions Design and Report with ...
procedure TForm1.Button1Click(Sender: TObject);
begin
frReport1.LoadFromFile('MasterDetail.lrf');
frReport1.DesignReport;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
frReport1.LoadFromFile('MasterDetail.lrf');
frReport1.ShowReport;
end;
Right click on frReport1 choose Design Report
a) Add Page header band with some rectangle objects for titles, run date, run time and page number information
b) Add Master data band with some fields from ZQuery1
c) Add Detail data band with some fields from ZQuery2
d) save as 'MasterDetail.lrf'
The only problem I had was under some conditions no details displayed and if the details band was narrower the rectangle objects I put on it, the band moved around independent of the rectangle objects.
HTH,
Doug