Only one record in master detail report with TClientDataSet


2004-05-04 08:39:07 PM
delphi171
I am using two TClientDataSets (CDSs) to access data in a master detail
relationship, with the mastersource, indexfieldnames and masterfields
properties configured in the detail CDS. At run time I set the
commandSQL for the two CDSs and include the joining field as a
parameter in the where clause for the detail e.g.
"where plan_ID=:plan_ID"
When the data sets are opened at run time on a quick report
one master record is returned with no details.
If I use two datagrid instead to display the records in the master
CDS then I get 4 records in the master. Also records are returned in
IBConsole if I make a joined SQL statement from the both the
master and the detail CommandSQL.
Any ideas why all the records are not appearing on the quick report
... I think this is a problem with the way I am using master detail
features in the CDSs rather than a problem with quick report,
the report data set is specified as the master CDS with the
detail CDS only mentioned in the individual fields in the detail.
Thanks,
Daniel.