Delete columns from oReport

Delete columns from oReport

Postby FranciscoA » Wed Apr 02, 2014 4: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: Select all  Expand view
     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
User avatar
FranciscoA
 
Posts: 2114
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Delete columns from oReport

Postby Marcelo Via Giglio » Thu Apr 03, 2014 3:55 pm

Hola,

did you try with the report´s DelColumn method?

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


then call stabilize() method

regards

Marcelo
Marcelo Via Giglio
 
Posts: 1051
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: Delete columns from oReport

Postby FranciscoA » Fri Apr 04, 2014 1: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=6&t=28257#p158126
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2114
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Delete columns from oReport

Postby carlos vargas » Fri Apr 04, 2014 2:52 am

Francisco, intenta
oReport:Stabilize()

salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1691
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Delete columns from oReport

Postby FranciscoA » Sat Apr 05, 2014 3: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
User avatar
FranciscoA
 
Posts: 2114
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 28 guests