xbrowser, setorder DESC

xbrowser, setorder DESC

Postby goosfancito » Sat Mar 09, 2024 4:14 pm

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
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: xbrowser, setorder DESC

Postby nageswaragunupudi » Mon Mar 11, 2024 6:59 am

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
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowser, setorder DESC

Postby goosfancito » Tue Mar 12, 2024 4:43 pm

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
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: xbrowser, setorder DESC

Postby acuellar » Wed Mar 13, 2024 8:40 pm

Estimado goosfancito

Tenes que crear tu indice en DESCENDENTE
Code: Select all  Expand view  RUN

INDEX ON NOMBRE TAG NOM  DESCEND
.....

....
SET ORDER TO TAG NOM
 
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1644
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: xbrowser, setorder DESC

Postby cmsoft » Wed Mar 13, 2024 11:40 pm

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

Code: Select all  Expand view  RUN

oBrw:aCols[2]:SetOrder()
oBrw:aCols[2]:cOrder := 'D'
 

De esta manenar te indica que el orden es descendente
User avatar
cmsoft
 
Posts: 1291
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: xbrowser, setorder DESC

Postby goosfancito » Thu Mar 21, 2024 6:22 pm

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

Re: xbrowser, setorder DESC

Postby goosfancito » Mon Mar 25, 2024 4:29 am

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

Code: Select all  Expand view  RUN

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
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: xbrowser, setorder DESC

Postby nageswaragunupudi » Mon Mar 25, 2024 4:49 am

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
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowser, setorder DESC

Postby goosfancito » Mon Mar 25, 2024 8:48 pm

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/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 41 guests