FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Delete columns from oReport
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Delete columns from oReport
Posted: Wed Apr 02, 2014 04:02 AM
Dear Friends:
I'm trying to delete columns of a report (TReport) when this has already been created.
How I can do?
Code (fw): Select all Collapse
      IF oReport:lCreated
      for n :=1 to len(oReport:aColumns)
             if oReport:aColumns[n]:lTotal =.t.
                if oReport:aColumns[n]:nTotal = 0
                   oReport:DelColumn(n)
                endif
             endif 
       next
       ENDIF

Thanks.
Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: Delete columns from oReport
Posted: Thu Apr 03, 2014 03:55 PM
Hola,

did you try with the report´s DelColumn method?

Code (fw): Select all Collapse
METHOD DelColumn( nColumn ) INLINE Adel( ::aColumns,nColumn ),;
                ASize( ::aColumns, Len( ::aColumns )- 1 )


then call stabilize() method

regards

Marcelo
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: Delete columns from oReport
Posted: Fri Apr 04, 2014 01:22 AM

Marcelo.
Thanks for reply. I'm doing as you say, but with not results.
I think, my fault is it on my function. I still seeking for a solution.
Thanks again.

viewtopic.php?f=6t=28257#p158126

&

Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Delete columns from oReport
Posted: Fri Apr 04, 2014 02:52 AM

Francisco, intenta
oReport:Stabilize()

salu2
carlos vargas

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: Delete columns from oReport
Posted: Sat Apr 05, 2014 03:25 PM

Carlos, gracias.
Asi lo hago. El caso es que quiero eliminar ciertas columnas del reporte cuyo nTotal sea 0.
Si trato de identificarlas desde oReport:lCreated, no lo hace, todas las detecta como 0.
Si lo hago desde el :bEnd, si las identifica, pero al aplicar el DelColumn() + Stabilize(), solo borra las columnas en la linea del total, quedando las demas intactas.

Carlos, thanks.
So I do it. The case is that I want to delete certain report columns whose nTotal is 0.
If I try to identify from oReport: lCreated, all columns total are detected as 0.
If I do it from oReport: bend, are identified, but applying the DelColumn () + Stabilize (), just delete the columns in the line of the total, leaving the rest intact.

Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql

Continue the discussion