Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxSpreadSheetReportDetail.MasterKeyFieldName Property

Specifies the field name in the master dataset for linking with the detail dataset.

#Declaration

Delphi
property MasterKeyFieldName: 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 (i.e., the key field name) to both the MasterKeyFieldName and DetailKeyFieldName properties. As a result, the field lists from both bound datasets appear hierarchically linked in the Field Chooser:

See Also