Group not grouping
In my Delphi 10.3 app using RB 21 Build 170 I have a basic report constructed like this -
2 tables - WASTEJOBS and WASTEDETAIL
They both contain a field JOBNO
The 2 datasets are both in JOBNO order
The report has the main data as WASTEJOBS, the report is grouped on JOBNO
there is a JOBNO in the group header
the detail section contains a child subreport links to data -WASTEDETAIL
for testing purposes the subreport detail section only contains WASTEDETAIL.JOBNO
However when the report is run, it doesn't break at group end sop the report looks like -every EWASTEDETAIL is printed for each WASTEJOB. I've done reports lime this for best part of 20 years. There is no data module inside the template, the data is queried before the data is loaded. This seems to be the only difference.
Could it be that I need a calculated field to do the grouping ?
Thanks
Andy
100 - Group header
100
101
102
102
103
104
104
101 - Group header
100
101
102
102
103
104
104
2 tables - WASTEJOBS and WASTEDETAIL
They both contain a field JOBNO
The 2 datasets are both in JOBNO order
The report has the main data as WASTEJOBS, the report is grouped on JOBNO
there is a JOBNO in the group header
the detail section contains a child subreport links to data -WASTEDETAIL
for testing purposes the subreport detail section only contains WASTEDETAIL.JOBNO
However when the report is run, it doesn't break at group end sop the report looks like -every EWASTEDETAIL is printed for each WASTEJOB. I've done reports lime this for best part of 20 years. There is no data module inside the template, the data is queried before the data is loaded. This seems to be the only difference.
Could it be that I need a calculated field to do the grouping ?
Thanks
Andy
100 - Group header
100
101
102
102
103
104
104
101 - Group header
100
101
102
102
103
104
104
Comments
If you are getting every detail record for each master record, it is likely the two datasets are not linked on a common field (JOBNO).
If you are creating your datasets in DADE, the linking is done visually in the data workspace.
If the datasets are in Delphi, they can be linked using DataPipeline linking or standard Delphi dataset linking.
https://rbwiki.digital-metaphors.com/data-access/database/linking-sql-queries/
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com