xbrowser, setorder DESC

Post Reply
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

xbrowser, setorder DESC

Post by goosfancito »

Hola.

Mi procedimiento almacenado en MARIADB devuelve la consulta ordenado por Fecha y Descendiente,
en el código luego hago un
acols[2]:setorder() (que es la columna fecha) y me lo ordena en forma ASCEndente.
como hago para que me lo ordene DESCENDENTE?
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
nageswaragunupudi
Posts: 10701
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 3 times
Contact:

Re: xbrowser, setorder DESC

Post by nageswaragunupudi »

If we use AUTOSORT clause while defining XBrowse, when the user clicks on a header, it automatically toggles sort ascending and descending.
Regards

G. N. Rao.
Hyderabad, India
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Re: xbrowser, setorder DESC

Post by goosfancito »

Ok.
Pero yo necesito que cuando muestre el xbrowser (al iniciar el programa) ya me muestre ordenado descendientemente por una columna.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
acuellar
Posts: 1645
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: xbrowser, setorder DESC

Post by acuellar »

Estimado goosfancito

Tenes que crear tu indice en DESCENDENTE

Code: Select all | Expand

INDEX ON NOMBRE TAG NOM  DESCEND
.....

....
SET ORDER TO TAG NOM 
 
Saludos,

Adhemar C.
User avatar
cmsoft
Posts: 1294
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina
Been thanked: 1 time

Re: xbrowser, setorder DESC

Post by cmsoft »

goosfancito wrote: acols[2]:setorder() (que es la columna fecha) y me lo ordena en forma ASCEndente.

Code: Select all | Expand

oBrw:aCols[2]:SetOrder()
oBrw:aCols[2]:cOrder := 'D'
 
De esta manenar te indica que el orden es descendente
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Re: xbrowser, setorder DESC

Post by goosfancito »

gracias!
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Re: xbrowser, setorder DESC

Post by goosfancito »

cmsoft wrote:
goosfancito wrote: acols[2]:setorder() (que es la columna fecha) y me lo ordena en forma ASCEndente.

Code: Select all | Expand

oBrw:aCols[2]:SetOrder()
oBrw:aCols[2]:cOrder := 'D'
 
De esta manenar te indica que el orden es descendente
Termino de probarlo pero no me lo hace che.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
nageswaragunupudi
Posts: 10701
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 3 times
Contact:

Re: xbrowser, setorder DESC

Post by nageswaragunupudi »

If the column is already ordered oCol:SetOrder() toggles ASC and DESC.
You need not have set aCols[ 2 ]:SetOrder() because it was already in the descending order.
Regards

G. N. Rao.
Hyderabad, India
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Re: xbrowser, setorder DESC

Post by goosfancito »

ok.
And so that the column that is ordered by "SELECT" appears the TRIANGULITE as it is done?
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Post Reply