FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Error TXBROWSE:nclrheadfore
Posts: 1078
Joined: Thu Sep 27, 2007 03:47 PM
Error TXBROWSE:nclrheadfore
Posted: Mon Sep 13, 2010 03:59 PM
Buen Dia, me genera este error al ejecutar.

Code (fw): Select all Collapse
tatic Function Visu_datos()  //usando txbrowse() xbrwtree
Local oBrw,oDlgbrow,cSelect,oDbfxls
  cSelect:=  Qscrsql_0025_1()
     EjeQueri(0,@oDbfxls,cSelect)

   DEFINE WINDOW oDlgBrow TITLE "DBF shown as a tree with XBrowse"

   @ 0, 0 XBROWSE oBrw OF oDlgbrow LINES CELL

   oBrw:SetTree( BuildTree(oDbfxls), { "OK", "RPV", "EXCEL" } )
    ADD TO oBrw DATA oBrw:oTreeItem:Cargo[ 1 ] HEADER "Last"
   ADD TO oBrw DATA oBrw:oTreeItem:Cargo[ 2 ] HEADER "First"

   oBrw:nMarqueeStyle = MARQSTYLE_HIGHLROW

   oBrw:CreateFromCode()
   oBrw:aCols[ 1 ]:cHeader = "State & City"

   oDlgBrow:oClient = oBrw
   oBrw:SetAdo(oDbfxls)  //oBrw:SetRDD()


   ACTIVATE WINDOW oDlgBrow 

Return Nil

static function BuildTree(oDbfxls)

   local oTree, cState

   TREE oTree
      While .Not. oDbfxls:EOF()
          if Empty( cState )
            _TreeItem( oDbfxls:Fields("tipanu"):Value ):Cargo := { Space( 20 ), Space( 20 ) }
            TREE
            cState = oDbfxls:Fields("tipanu"):Value
         else
            if cState != oDbfxls:Fields("tipanu"):Value
               ENDTREE
               cState = oDbfxls:Fields("tipanu"):Value
               _TreeItem( oDbfxls:Fields("tipanu"):Value ):Cargo := { Space( 20 ), Space( 20 ) }
               TREE
            endif   
         endif   
         if oDbfxls:Fields("tipanu"):Value == cState
            _TreeItem( oDbfxls:Fields("tipanu"):Value ):Cargo := { oDbfxls:Fields("codanu"):Value, oDbfxls:Fields("nombre_anu"):Value }
         endif   
        oDbfxls:MoveNext()
      enddo
      ENDTREE
   ENDTREE
   oDbfxls:MoveFirst()

return oTree


http://img443.imageshack.us/img443/9053 ... browse.jpg
Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com

Continue the discussion