Master-Detail with TClientDataSet
I want to create a master-detail report with 2 ClientDataSet, which are connected to a DataSetProvider.
The detail band always shows the same record for all master records. Allthough, it is correctly displayed in the DBGrid.
What I am doing wrong?
Some background info:
The detail ClientDataSet has no master relation defined (all data are loaded at once), this is necessary for the DevExpress QuantumGrid, which is doing a master detail relationship on its own style. Just before I print the report, I clone my detail CDS and set the proper master fields, in order the Report can apply the detail filter (as descript in the UserManual.pdf).
Can anybody help me. I don't know what I am doing wrong?
The detail band always shows the same record for all master records. Allthough, it is correctly displayed in the DBGrid.
What I am doing wrong?
Some background info:
The detail ClientDataSet has no master relation defined (all data are loaded at once), this is necessary for the DevExpress QuantumGrid, which is doing a master detail relationship on its own style. Just before I print the report, I clone my detail CDS and set the proper master fields, in order the Report can apply the detail filter (as descript in the UserManual.pdf).
Can anybody help me. I don't know what I am doing wrong?
  cdsDetail := TClientDataSet.Create(self);
  cdsDetail.CloneCursor(cdsOpZahlung, false);
  cdsDetail.IndexFieldNames := cdsOpZahlungOPID.FieldName;
  cdsDetail.MasterSource := dscrAnlage;
  cdsDetail.MasterFields := cdsAnlageEABUCHID.FieldName;
  rdsOpDetail.DataSet := cdsDetail;//frxDBDataSet
Comments
That makes the report genaration slow and looks strange, since you see how the Grid is scrolling down [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Is there another solution?[/img]