FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Xbrowse oCol assigment with variabel Headers
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Xbrowse oCol assigment with variabel Headers
Posted: Thu Jan 31, 2019 11:06 PM

I always want to use the col names for all actions in xbrowse, since while in devellopment, de colums always changes from place

so we know this works

  WITH OBJECT :p_2018
     :nEditType     := EDIT_NONE
  END
  WITH OBJECT :p_2017
     :nEditType     := EDIT_NONE
  END

Now I was able to have a dynamic header in xbrowse based on the active year : J_2019, J_2018, J_2017,... (So this works)

 oBrw[1]:cHeaders := { 'Code','Naam','Gemeente','Dat_LST','J_'+str(year(date()),4),'J_'+str(year(date())-1,4),'J_'+str(year(date())-2,4),'J_'+str(year(date())-3,4),'J_'+str(year(date())-4,4),'Totaal' }

Now I Tried to get the object working

WITH OBJECT : &'J_'+str(year(date()))
:cOrder:= "D" // No obstante muestra como "A"
//:aBarGetList:= aGroepen
ENDWITH

I tried several combinations, but didn't find the correct way

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xbrowse oCol assigment with variabel Headers
Posted: Thu Jan 31, 2019 11:39 PM
Code (fw): Select all Collapse
WITH OBJECT :oCol( "J_" + Str( Year( Date() ), 4 ) )
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion