TdxSpreadSheetReportDetail.DetailKeyFieldName Property
Specifies a field name in the bound dataset corresponding to the key field name in the master dataset.
Declaration
property DetailKeyFieldName: string read; write;
Property Value
Type |
---|
string |
Remarks
You can use the MasterKeyFieldName and DetailKeyFieldName properties to specify the master and detail key field names in order to establish the master-detail relationship between a dataset bound by using the Report Designer’s DataBinding.DataSource property and a dataset bound by using the DataSource property.
For instance, mdsMaster is the detail dataset bound by using the DataSource.DataSet property, and mdsDetailLevel0 is the master dataset bound by using the DataBinding.DataSource.DataSet property provided by the Report Designer. The mdsDetailLevel0 dataset contains information on products, including ID numbers of the corresponding suppliers, while the mdsMaster dataset stores information on suppliers.
Both datasets contain the SupplierID field, which uniquely identifies suppliers. To establish the master-detail relationship between the datasets, you need to assign the ‘SupplierID’ string to (i.e., the key field name) both the MasterKeyFieldName and DetailKeyFieldName properties. As a result, the field lists from both bound datasets appear hierarchically linked in the Field Chooser: