Un viejo problema con TReport (SOLUCIONADO)

Un viejo problema con TReport (SOLUCIONADO)

Postby Armando » Mon Mar 01, 2010 4:19 pm

Amigos, y en especial a A. Linares & team:

En las versiones de FW a 16 bits un reporte creado con la clase TReport se mostraba así:

Image

Observen los textos ENTRADAS SALIDAS SALDOS, ocupan dos o hasta tres columnas simulando unos super header y esto es lo correcto.

Sin embargo ahora con las versiones a 32bits se muestra así:

Image

Los mismos textos se recortan a una sola columna.

El código es el mismo para ambos reportes solo cambia la version de 16 a 32bits

Code: Select all  Expand view

COLUMN TITLE "","Fecha"                 DATA Date2Txt((cVales)->DET_FEC) SIZE 10 RIGHT
COLUMN TITLE "","Referencia"            DATA (cVales)->DET_REF SIZE 10 LEFT
COLUMN TITLE "","Vale"                  DATA (cVales)->DET_VAL SIZE  5 RIGHT
COLUMN TITLE "Costo","Unitario"     DATA (cVales)->DET_UNI SIZE 10 RIGHT PICTURE "@Z 99,999,999.99"
COLUMN TITLE "","Cntdd"                 DATA IF ((cVales)->DET_EOS == 1,(cVales)->DET_CTD,0) SIZE  7 RIGHT PICTURE "@Z 999,999" TOTAL
COLUMN TITLE "E   N   T   R   A   D   A   S ",;
        "Importe"               DATA IF ((cVales)->DET_EOS == 1,(cVales)->DET_NET,0) SIZE 12 RIGHT PICTURE "@Z 99,999,999.99" TOTAL
COLUMN TITLE "","Undd"                  DATA (cVales)->DET_NUM SIZE  5 RIGHT
COLUMN TITLE "","Cntdd"                 DATA IF ((cVales)->DET_EOS == 2,(cVales)->DET_CTD,0) SIZE  7 RIGHT PICTURE "@Z 99,999" TOTAL
COLUMN TITLE "S      A      L      I      D      A      S  ",;
        "Importe"               DATA IF ((cVales)->DET_EOS == 2,(cVales)->DET_NET,0) SIZE 12 RIGHT PICTURE "@Z 99,999,999.99" TOTAL
COLUMN TITLE "","Cntdd"                 DATA "" SIZE  5 RIGHT TOTAL PICTURE "@ 999,999"
COLUMN TITLE "S    A    L    D    O    S  ",;
        "Importe"               DATA "" SIZE 12 RIGHT TOTAL PICTURE "@ 999,999,999.99"
 


Cómo puedo lograr el mismo efecto que aparece en 16bits pero ahora en 32 ?.

Antonio, sería excelente que esta clase tuviera la posibilidad de los Super Headers como en la clase TXBrowse.

Desafortunadamente mis conocimientos no alcanzan para modificar la clase.

Agradecido con su apoyo.

Saludos
Last edited by Armando on Wed Mar 03, 2010 5:00 pm, edited 1 time in total.
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3103
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Un viejo problema con TReport

Postby Armando » Tue Mar 02, 2010 11:43 am

Maestro Antonio:

Será que no hay solución a esto ?

Saludos
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3103
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Un viejo problema con TReport

Postby Armando » Wed Mar 03, 2010 1:24 am

Antonio:

Disculpa la insistencia pero ya tengo convertida toda la aplicación y solo este problema me esta retrasando la entrega a mi cliente.

Ojalá pudiera haber alguna solución.

Saludos
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3103
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Un viejo problema con TReport

Postby Daniel Garcia-Gil » Wed Mar 03, 2010 4:12 am

Armando

Prueba con cambiar el METHOD SayTitle de la clase TRColumn por este otro, luego nos comentas, gracias

Code: Select all  Expand view

METHOD SayTitle(nRow, nCol, nLine)  CLASS TRColumn

     LOCAL oFont
     LOCAL cTitle
     LOCAL nWidth, nFont
     LOCAL nTxtWidth

     DEFAULT nRow  := 0      ,;
             nCol  := ::nCol ,;
             nLine := 1

     IF nLine > len(::aTitle)
          RETU NIL
     ENDIF

     cTitle := eval(::aTitle[nLine])
     nFont  := eval(::bTitleFont)
     oFont  := ::oReport:aFont[nFont]

     ::nCurLine := nLine

     nTxtWidth = ::oReport:oDevice:GetTextWidth(cTitle, ::oReport:aFont[eval(::bDataFont)] )

     IF ::nWidth < nTxtWidth
        ::oReport:oDevice:Say(nRow, nCol - ( nTxtWidth - ::nWidth ), cTitle, oFont, nTxtWidth,;
                           ::oReport:aClrText[nFont],,::nPad-1)
     ELSE
        ::oReport:oDevice:Say(nRow, nCol, cTitle, oFont, ::nWidth,;
                           ::oReport:aClrText[nFont],,::nPad-1)
     ENDIF
                           

RETURN NIL
 
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Un viejo problema con TReport

Postby Armando » Wed Mar 03, 2010 3:41 pm

Daniel:

Para variar :D , éxito total (como siempre).

Muchas gracias

Saludos
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3103
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 131 guests