FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TxBrowse Columns...(Solucionado)
Posts: 632
Joined: Tue Dec 12, 2006 07:34 PM
TxBrowse Columns...(Solucionado)
Posted: Thu Jul 24, 2014 10:12 PM
Hola buenas tardes de antemano les envio cordial saludos.

Una pregunta para los que ya usan TXBrowse, se puede incrustar funcion dentro del parametro de campo COLUMNS "NivCta(CUENTA)"...si se puede como se traduciria, en caso que no...! cual es la otra forma...para poder usar la funcion en la variable COLUMNS "CUENTA" y que sea asi COLUMNS "NivCta(CUENTA)"

Es una funcion para separar niveles de cuentas ...en el campo esta "1020000100002" y con la funcion separar guiones "1020-0001-0002" , es el motivo por el cual quiero incrustar la funcion de esta manera, o que me indiquen de que otra forma programar TXBrowse

Code (fw): Select all Collapse
REDEFINE XBROWSE oSBrw ID 101 OF oSDlg ;
           HEADERS "Cuenta","Descripción","Saldo Ant" ;
           COLUMNS "NivCta(CUENTA)","TIPO","DESCRIP"  ;
           ALIAS (S11)->( ALIAS() ) // FOOTERS CELL AUTOCOLS



STATIC FUNCTION NivCta(cCta)
....Instruccion
CUENTA := S11->CUENTA
Return (CUENTA)

Si el Ing. Nages me puede orientar o un ejemplo sencillo para incrustar la funcion en la variable campo "CUENTA"

Saludos y buen dia.!

Atte: Adrian C. C.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TxBrowse Columns...
Posted: Fri Jul 25, 2014 03:29 AM

1) If NivCta() is a public function ( i.e, not a static function ), you can use "NivCta(CUENTA)", .... For this, instead of static function, make it as function.

2) If NivCta() is a static function then you need to use a codeblock :

COLUMNS { || NivCta(CUENTA) }, "TIPO", "DESCRIP" ;

3) If the purpose of the function is only to convert "1020000100002" as "1020-0001-0002", you can better use "TRANSFORM( CUENTA, '@R 9999-9999-9999' )", "TIPO", .....

Regards



G. N. Rao.

Hyderabad, India
Posts: 632
Joined: Tue Dec 12, 2006 07:34 PM
Re: TxBrowse Columns...(Solucionado)
Posted: Fri Jul 25, 2014 05:58 PM
nageswaragunupudi wrote:#1) If NivCta() is a public function ( i.e, not a static function ), you can use "NivCta(CUENTA)", .... For this, instead of static function, make it as function.

#2) If NivCta() is a static function then you need to use a codeblock :
COLUMNS { || NivCta(CUENTA) }, "TIPO", "DESCRIP" ;

#3) If the purpose of the function is only to convert "1020000100002" as "1020-0001-0002", you can better use "TRANSFORM( CUENTA, '@R 9999-9999-9999' )", "TIPO", .....



Thanks very good Nages .

Gracias Nages muy amable por tu interes me ayudo mucho con el ejemplo y buena explicacion.

Saludos y buen dia.

Atte: Adrian C. C.

Continue the discussion