Hola Grupo, gusto en saludarlos.
Tenemos un reporte con grupos y columnas con totales, pero no queremos que
se impriman los totales finales o gran total, se puede ? He buscado en la
ayuda pero no doy con la solucion. Alguien ya lo hizo ?
Saludos Cordiales
Juan Castillo Arteaga.
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Totales en reports
Totales en reports
Hola Grupo, gusto en saludarlos :{)
Viendo el codigo c:xailer2sourcereport.prg esta el metodo PrintTotals() y
alucinando, seria aceptable agregar una data en la clase lNoGrandTotal ? y
en el metodo condicionar la linea
#Linea 886 AEval( ::aColumns, {|v| v:PrintTotal( ::nRow ) } )
con la siguiente condicion ?
If ::Finished
If ! ::lNoGrandTotal
AEval( ::aColumns, {|v| v:PrintTotal( ::nRow ) } )
EndIf
EndIf
La data lNoGrandTotal en su valor de default seria .F.
Alguna recomendacion o sugerencia ?
PD La version que estamos usando es la 2.0.0 (March 2009)
"Juan Castillo A." <juanc@lasnovedades.com.mx> escribió en el mensaje
news:49ea1aba$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hola Grupo, gusto en saludarlos.
>
> Tenemos un reporte con grupos y columnas con totales, pero no queremos que
> se impriman los totales finales o gran total, se puede ? He buscado en la
> ayuda pero no doy con la solucion. Alguien ya lo hizo ?
>
>
> Saludos Cordiales
>
> Juan Castillo Arteaga.
>
Viendo el codigo c:xailer2sourcereport.prg esta el metodo PrintTotals() y
alucinando, seria aceptable agregar una data en la clase lNoGrandTotal ? y
en el metodo condicionar la linea
#Linea 886 AEval( ::aColumns, {|v| v:PrintTotal( ::nRow ) } )
con la siguiente condicion ?
If ::Finished
If ! ::lNoGrandTotal
AEval( ::aColumns, {|v| v:PrintTotal( ::nRow ) } )
EndIf
EndIf
La data lNoGrandTotal en su valor de default seria .F.
Alguna recomendacion o sugerencia ?
PD La version que estamos usando es la 2.0.0 (March 2009)
"Juan Castillo A." <juanc@lasnovedades.com.mx> escribió en el mensaje
news:49ea1aba$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hola Grupo, gusto en saludarlos.
>
> Tenemos un reporte con grupos y columnas con totales, pero no queremos que
> se impriman los totales finales o gran total, se puede ? He buscado en la
> ayuda pero no doy con la solucion. Alguien ya lo hizo ?
>
>
> Saludos Cordiales
>
> Juan Castillo Arteaga.
>
Totales en reports
Leyendo y buscando, encontramos en http://xailer.info/esp/?p=21#more-21 el
norte de la solucion, pusimos el siguiente codigo en el Forma Principal y al
momento de definir los reportes ponemos :
oReporte:lGrandTotal := .F. y funciono!
Class TReport From xReport
PUBLISHED:
Property lGrandTotal Init .T. // Variable agregada
PROTECTED:
METHOD PrintTotals()
EndClass
METHOD PrintTotals() CLASS TReport
LOCAL cText
::nBottomDataRow := ::nRow
IF ! ::lTotal .OR. ( ! ::lPageTotal .AND. ! ::Finished() )
RETURN Nil
ENDIF
IF ::Finished()
cText := ::cGrandTotal
ELSE
cText := ::cPageTotal
ENDIF
If ::lGrandTotal // Condicion agregada
::PrintHorzLine( ::nTotalLine, .T. )
EndIf
IF ! Empty( cText )
WITH OBJECT ::oDevice:oCanvas
:SelectFont( ::aFonts[ 1 ] )
:nTextAlignment := taLEFT
:TextOut( ::nLeftCol, ::nRow, cText )
END WITH
ENDIF
If ::lGrandTotal // Condicion agregada
AEval( ::aColumns, {|v| v:PrintTotal( ::nRow ) } )
EndIf
::nRow += ::nLineHeight
RETURN Nil
norte de la solucion, pusimos el siguiente codigo en el Forma Principal y al
momento de definir los reportes ponemos :
oReporte:lGrandTotal := .F. y funciono!
Class TReport From xReport
PUBLISHED:
Property lGrandTotal Init .T. // Variable agregada
PROTECTED:
METHOD PrintTotals()
EndClass
METHOD PrintTotals() CLASS TReport
LOCAL cText
::nBottomDataRow := ::nRow
IF ! ::lTotal .OR. ( ! ::lPageTotal .AND. ! ::Finished() )
RETURN Nil
ENDIF
IF ::Finished()
cText := ::cGrandTotal
ELSE
cText := ::cPageTotal
ENDIF
If ::lGrandTotal // Condicion agregada
::PrintHorzLine( ::nTotalLine, .T. )
EndIf
IF ! Empty( cText )
WITH OBJECT ::oDevice:oCanvas
:SelectFont( ::aFonts[ 1 ] )
:nTextAlignment := taLEFT
:TextOut( ::nLeftCol, ::nRow, cText )
END WITH
ENDIF
If ::lGrandTotal // Condicion agregada
AEval( ::aColumns, {|v| v:PrintTotal( ::nRow ) } )
EndIf
::nRow += ::nLineHeight
RETURN Nil