Subject | Re: [IBO] Ordering Items |
---|---|
Author | Paul Vinkenoog |
Post date | 2004-01-13T11:27:32Z |
Hi Christian,
Product=ProductField;ProductField desc
ArtNo=ArtNoField;ArtNoField desc
Date=DateField;DateField desc
etc.
Now if you assign OrderingItemNo = 1, the ordering will be on
ProductField; 2: on ArtNoField; and 3: on DateField.
But here's the trick: if you set OrderingItemNo to -1, -2, or -3,
the descending order will be used. More precisely: if you assign
a negative OrderingItemNo, the part after the semicolon will be
in effect.
If you want to make a certain ordering the default, put it in your
query's SQL:
SELECT ...
FROM ....
WHERE ...
ORDER BY DateField DESC
Now as long as you don't assign an OrderingItemNo (or if you set it
to 0), the dataset will be ordered on DateField DESC.
Greetings,
Paul Vinkenoog
> I am using TIB_Query.OrderingItem to assign a default ordering itemYou can define your OrderingItems like this:
> to my dataset. This works really fine.
>
> But is there a way to make it so that this ordering item is sorted
> in descending order?
Product=ProductField;ProductField desc
ArtNo=ArtNoField;ArtNoField desc
Date=DateField;DateField desc
etc.
Now if you assign OrderingItemNo = 1, the ordering will be on
ProductField; 2: on ArtNoField; and 3: on DateField.
But here's the trick: if you set OrderingItemNo to -1, -2, or -3,
the descending order will be used. More precisely: if you assign
a negative OrderingItemNo, the part after the semicolon will be
in effect.
If you want to make a certain ordering the default, put it in your
query's SQL:
SELECT ...
FROM ....
WHERE ...
ORDER BY DateField DESC
Now as long as you don't assign an OrderingItemNo (or if you set it
to 0), the dataset will be ordered on DateField DESC.
Greetings,
Paul Vinkenoog