FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse dynamic Array headers
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
xBrowse dynamic Array headers
Posted: Wed Oct 10, 2012 10:08 PM
To All

I am creating a browse from a dynamic array based on the number of employees and I want to use their names for the Column headers... as you can see .. all the names have been consolidated in column1.

Obviously I did not succeed .. any help would be appreciated.

Code (fw): Select all Collapse
cHeader := " Time  ,;"
cHeader += "Angelo Russo,;"
cHeader += "Aaron Rymal,;"
cHeader += "Richard Lipkin"

...
...
 REDEFINE xBROWSE oLbxA        ;
         ARRAY aSchedule             ;
         HEADERS cHeader             ;
         ID 172 of oSch              ;
       AUTOCOLS LINES CELL


Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: xBrowse dynamic Array headers
Posted: Wed Oct 10, 2012 10:20 PM
Rick,

try some thing like this

Code (fw): Select all Collapse
FOR i := 1 TO LEN( oBrw:aCols )
      oBrw:aCols[i]:cHeader  := aName[i]
NEXT


aName is array with the users name

regards

Marcelo
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse dynamic Array headers
Posted: Thu Oct 11, 2012 12:57 PM

Mr Rick

If you have all header names in an array like aHead, then while creating XBrowse use the clause

@ 0,0 XBROWSE ..<clauses>................. HEADERS aHead ...... <other clauses>

Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: xBrowse dynamic Array headers
Posted: Thu Oct 11, 2012 01:03 PM

Marcelo, Rao

Both your solutions worked .. Thank you very much!

Rick Lipkin

Continue the discussion