Solved

Sort the detail dataset

Posted on 1998-08-26
3
157 Views
Last Modified: 2010-04-04
I have two tables linked by fields 'id' and 'doc_id' which produces the correct search results but when I sort detail table, relationship go broken.

How I may sort detail dataset without TQuery component?
(TQuery very slowly on Local DB)
0
Comment
Question by:Jam
  • 2
3 Comments
 

Author Comment

by:Jam
ID: 1337831
Edited text of question
0
 

Author Comment

by:Jam
ID: 1337832
Adjusted points to 75
0
 
LVL 1

Accepted Solution

by:
AndersWP earned 70 total points
ID: 1337833
You can do it be using an index for the detail table. Suppose your detail table has four fields: DOC_ID, DATE, TITLE and TEXT ( this is just an example) and that it is linked to field ID in the master table. To show the detail records sorted by DATE, you create an index for the detail table over the fields (DOC_ID, DATE) in that order. Depending on the database you are using, you should then set either the IndexFieldNames property of you detail TTable object to DOC_ID, DATE or the IndexFile property to the name of your index.
You can sort the detail table by TITLE by creating a (DOC_ID, TITLE) index etc. You can swicth from one sort to the other by changing the IndexFieldNames property at run-time. If you do this, you may need to do a Refresh on either the master or the detail table.

I hope this will help you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now