Am 23.02.2006 um 13:02 schrieb Ed Leafe:

On Feb 23, 2006, at 5:12 AM, sk2001de wrote:

I'm a bit puzzled how to sort the data retrieved by the query (datanav.Form derived class). With the FieldSpecEditor resp. in the according file fieldSpecs.fsxml I can determine the order in which the fields appear in the forms. In the method BizXXX.setBaseSQL() (BiyXXX derived from dBizObj) I can use self.addOrderBy() or self.setOrderByClause() but this seems to be overridden before the query is made.

A while ago I added a hack to order the columns, and since we never figured out a better way, it's still in there. Right-click on the *label* for the column on the select page, and you'll get a context menu that will allow you to sort on that column.

Sorting the data after doing the query doesn't really help. I have a table to which entries are continuously added, including a timestamp. Since the table will grow quite large, it is not desirable to query all entries at once, but instead the user wants to see the, say, 100 latest entries. So the SQL statement should look like

FROM protocol SELECT * ORDER BY stamp DESC LIMIT 100

But how do I achieve this in the query for the datanav page? I tried to use self.addOrderBy() or self.setOrderByClause() but the "Last SQL" option won't include the ORDER clauses.


I could rely on the user to click a column header in order to sort the data, but in conjunction with the LIMIT clause sorting is necessary to get usable datasets.

Paul may come up with a better solution, since he refactored the datanav stuff into its current form, but the right-click on the label should work.

At least not in my installations, here the context menu only reads "Autosize Column". However, double-clicking the column sorts the data ascending / descending.



Thanks
 Stefan

--- StripMime Report -- processed MIME parts ---
multipart/mixed
 text/plain (text body -- kept)
 image/png
 text/plain (text body -- kept)
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to