Answer the question
In order to leave comments, you need to log in
IBDataSet Sorting by CalcFields?
Hey!
Oh ... people are bad for me !!!
Given:
1. IBDataSet. With all configured queries, and a very important query RefreshSLQ
2. The dataset has a calculated field SUMM, it is calculated cleverly by means of SQL not to be solved.
3. cxGridDBTableView in GridMode (That is, it displays the sorting as it is in the DataSet, and displays only a small number of records, the rest continues as needed). It is impossible to transfer to another mode, since there is a large amount of data.
Task:
Sort the data by the SUMM field.
How to do it?
Answer the question
In order to leave comments, you need to log in
imho to sort by a field its values should be already known before sorting. And at you they are calculated only to a loading campaign. Here it is necessary either to change the task statement, or to make a stored procedure where to calculate the value of this field, or if there is not enough functionality, then write udf (ib / fb allow this). But it still won't do anything, because. the user needs to send the data already in a sorted form, and for this it is necessary to calculate this field for all records.
If possible, then this field can be calculated already when adding / updating records in this table. Plus, you still need to create an index for this field, but here you need to look at how unique it will be.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question