FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Select columns of a Xbrowse to print
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Select columns of a Xbrowse to print
Posted: Thu Oct 21, 2021 11:43 AM
I wish select the columns of a Xbrowse to print but when the user
when the user selects the column the procedure must enter a number 1,2,3 and then in the report he must print giving the order of the selected columns
for example in the customer file I could first select the city field giving the number 1 and then first giving the number 2 and then zipcode giving the number 3 and the report must print the connections in this sequence
City, first, zipcode

for a sample I have the selection for excel


I would like the end user, in addition to deciding which column to be printed,
to insert only by clicking with the mouse the number of the column to be printed first

how can I do ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Select columns of a Xbrowse to print
Posted: Sat Oct 30, 2021 02:27 AM
Code (fw): Select all Collapse
aCols := { "CITY", "FIRST", "ZIP" }
cSave := oBrw:SaveState()
oBrw:ReArrangeCols( aCols )
oBrw:Report()
oBrw:RestoreState( cSave )
oBrw:Refresh()
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Select columns of a Xbrowse to print
Posted: Sat Oct 30, 2021 07:31 AM

THANKS RAO

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: Select columns of a Xbrowse to print
Posted: Sun Sep 11, 2022 02:29 PM
nageswaragunupudi wrote:
Code (fw): Select all Collapse
aCols := { "CITY", "FIRST", "ZIP" }
cSave := oBrw:SaveState()
oBrw:ReArrangeCols( aCols )
oBrw:Report()
oBrw:RestoreState( cSave )
oBrw:Refresh()



Buen dua, intente hacer esto ya que necesito crear reportes sólo de algunas columnas del xbrowse, pero sólo me sale en el Report la primera columna, que estaré haciendo mal o cual es la forma correcta?

También probé usar obrw:Report (,,,,,,aCols) y no toma en cuenta aCols el cual está previamente definida.. gracias... Saludos..
Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Select columns of a Xbrowse to print
Posted: Sun Sep 11, 2022 03:44 PM
Code (fw): Select all Collapse
obrw:Report (,,,,,,aCols)

is the right way to go.
My previous reply was for older versions of FWH.

aCols can be an array of
Column headers (or) Column numbers at the time of creation
Regards



G. N. Rao.

Hyderabad, India
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: Select columns of a Xbrowse to print
Posted: Sun Sep 11, 2022 06:30 PM

Tengo versión 21.11

Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: Select columns of a Xbrowse to print
Posted: Sun Sep 11, 2022 06:30 PM

Tengo versión 21.11

Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Select columns of a Xbrowse to print
Posted: Mon Sep 12, 2022 11:08 AM
It works with 21.11

Try this small sample
Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()

   XBROWSER "CUSTOMER.DBF" TITLE FWVERSION ;
      COLUMNS "FIRST", "CITY", "AGE", "SALARY" ;
      SETUP( oBrw:cHeaders := { "NAME", "TOWN", "QTY", "AMOUNT" }, ;
      oBrw:bRClicked := { |r,c,f,o| o:Report(,,,,,, { "AMOUNT", "QTY", "TOWN" } ) } )

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: Select columns of a Xbrowse to print
Posted: Mon Sep 12, 2022 06:14 PM
nageswaragunupudi wrote:It works with 21.11

Try this small sample
Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()

   XBROWSER "CUSTOMER.DBF" TITLE FWVERSION ;
      COLUMNS "FIRST", "CITY", "AGE", "SALARY" ;
      SETUP( oBrw:cHeaders := { "NAME", "TOWN", "QTY", "AMOUNT" }, ;
      oBrw:bRClicked := { |r,c,f,o| o:Report(,,,,,, { "AMOUNT", "QTY", "TOWN" } ) } )

return nil



Buen dia, ya funciono, yo staba tomando los nombres de las columnas COLUMNS, creyendo era eso por ser aCols, es decir los nombres de los campos y no los nombre de los titulos de las columnas HEADERS, gracias, saludos... :-)
Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Select columns of a Xbrowse to print
Posted: Tue Sep 13, 2022 02:43 PM

I am not able to answer you, unfortunately I am not well in this period and the fwteam knows my situation

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Select columns of a Xbrowse to print
Posted: Tue Sep 13, 2022 03:40 PM

Dear Silvio,

How are you ? Feeling better ?

Are you already at home ?

our best wishes for your quick recovery

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Select columns of a Xbrowse to print
Posted: Tue Sep 13, 2022 04:57 PM

Te deseo pronta mejoría y salud para ti Silvio. ¿Con quién voy a "luchar" en furum? jajajajaja

I wish you speedy improvements and health for you Silvio. Who am I going to "fight" in furum? hahahahaha

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
Re: Select columns of a Xbrowse to print
Posted: Tue Sep 13, 2022 05:55 PM

Dear Silvio,
I hope there is nothing too serious about you.
Recover quick and remember... you must complete your lotto software to become a very rich man. :)

Regards, Detlef

Posts: 1710
Joined: Tue Oct 28, 2008 06:26 PM
Re: Select columns of a Xbrowse to print
Posted: Wed Sep 14, 2022 11:46 AM

Strength and speedy recovery dear Silvio.

Saludos,



Adhemar C.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Select columns of a Xbrowse to print
Posted: Wed Sep 14, 2022 08:29 PM

..

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion