Samuel, The detail dataset has to be primarily sorted by foreignKey if the master detail relationship is via that field. However there is nothing stopping you from having a second sort order which is used to sort records which have the same foreignKey value.
I believe you can do this by specifying IndexFieldNames as: foreignKey;name David. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Allan, Samuel > Sent: Wednesday, 19 March 2003 5:19 PM > To: Multiple recipients of list delphi > Subject: [DUG]: Client data set in master-detail relationship > > > I have two client data sets in a master detail relationship. > Simplified, the detail client data set has two fields: foreignKey > and name. > > Previously, when I have wanted to sort a client data set I have > set the IndexFieldNames or IndexName appropriately, which is what > it says to do in the help. > > But if I set the relationship up then the IndexFieldNames > property changes to foreignKey. And the master detail > relationship works fine, so long as you don't mind the detail not > being sorted. > > I want it sorted by name. So I set the IndexFieldNames property > back to name (or set an index or whatever). But then the > relationship stops working and it behaves as if the master > records have no details. When I look at the relationship I find > that it has changed. So I set the relationship up right and I am > back at the start. > > Can someone please tell me either what I am doing wrong, or > another way to get sort a detail client data set, while retaining > its master/detail relationship? > ------------------------------------------------------------------ > --------- > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
