Tengo 2 problemas por resolver al usar REPORT.
1. Como puedo poner un contador total de líneas impresas en el pie de página en el reporte?
2. Al ejecutar por primera vez la opción del reporte, todo bien, se muestra la información solicitada en un PREVIEW, puedo imprimir o generar un Pdf, el problema es que al cerrar el informe y tratar nuevamente de ingresar a la opción para generar nuevo informe, el sistema se cae y arroja el error que dejo mas abajo.
En espera de su siempre ayuda, les agradece,
Antonio.
FWH 17.09 - HARBOUR
Codigo del programa:
- Code: Select all Expand view RUN
#include "fivewin.ch"
#include "report.ch"
#define LINE_LEFT 1
STATIC oReporte
function Rep2()
Local cTi1,cTi2,oPen1,oPen2,oFo1,oFo2,oFo3,oLine,oFo4,nCounter := 0,cTi0,oFo5
Sele 1
Use Pasoinf
DEFINE FONT oFo1 NAME "ARIAL" SIZE 0, -12 BOLD
DEFINE FONT oFo2 NAME "ARIAL" SIZE 0, -15 BOLD
DEFINE FONT oFo3 NAME "ARIAL" SIZE 0, -10
DEFINE FONT oFo4 NAME "ARIAL" SIZE 0, -8
DEFINE FONT oFo5 NAME "ARIAL" SIZE 0, -18 BOLD
DEFINE PEN oPen1 STYLE 0 WIDTH 1 COLOR CLR_RED OF oReporte
DEFINE PEN oPen2 STYLE PS_DOT WIDTH 1 COLOR CLR_HGRAY OF oReporte
cTi0:= "CENTRO MEDICO REM SUR"
cTi1:= "INFORMES ECOGRAFIAS INFORMADAS FEBRERO DE 2021"
cTi2:="Dr. Claudio Parra"
REPORT oReporte;
TITLE cTi1,cTi2 ;
FONT oFo1,oFo2,oFo3,oFo4,oFo5;
PEN oPen1,;
oPen2 ;
HEADER cTi0,"Fecha: "+dtoc(date()),;
"Hora: "+time() ;
RIGHT ;
FOOTER "Página: "+str(oReporte:nPage,3) ;
CENTERED ;
PREVIEW
COLUMN TITLE "Nro. Ing." DATA Nro_Bon PICTURE "9999999999" SIZE 10 FONT 4
COLUMN TITLE "Fecha Ing." DATA Fec_Bon SIZE 10 FONT 4
COLUMN TITLE "Fecha Inf." DATA Fec_Inf SIZE 10 FONT 4
COLUMN TITLE "Nombre Paciente" DATA Nom_Pac SIZE 30 FONT 4
COLUMN TITLE "T. Pago" DATA Tip_Pag SIZE 10 FONT 4
COLUMN TITLE "Valor Examen" DATA Val_Bon PICTURE "999,999,999" TOTAL RIGHT FONT 3 SIZE 15
END REPORT
oReporte:oTitle:aFont[1] := {|| 2 }
oReporte:oTitle:aFont[2] := {|| 1 }
oReporte:oHeader:aPad[1]:= LINE_LEFT
oReporte:oHeader:aFont[1] := {|| 5 }
oReporte:lJoin := .t.
oReporte:nSeparator := 0
oReporte:cGrandTotal:="Total General"
oReporte:lPageTotal:=.f.
oReporte:oDevice:SetPortrait()
oReporte:oDevice:lPrvModal:=.t.
ACTIVATE REPORT oReporte
oFo1:End()
oFo2:End()
oFo3:End()
oFo4:End()
oFo5:End()
oPen1:End()
oPen2:End()
Close all
return nil
Error al ingresar por segunda vez a la opcion del informe:
- Code: Select all Expand view RUN
Application
===========
Path and name: C:\Desa\Informes Win\InfoWin.exe (32 bits)
Size: 4,352,512 bytes
Compiler version: Harbour 3.2.0dev (r1506171039)
FiveWin version: FWH 17.09
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 25 secs
Error occurred at: 20/03/2021, 10:02:51
Error description: Error BASE/1004 Message not found: TREPORT:NLOGPIXELY
Args:
[ 1] = O TREPORT
Stack Calls
===========
Called from: => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TREPORT:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TREPORT:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TREPORT:NLOGPIXELY( 0 )
Called from: .\source\classes\PEN.PRG => TPEN:NEW( 31 )
Called from: .\Reporte2.PRG => REP2( 21 )
Called from: .\InfoWin.PRG => (b)MENU( 138 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 1548 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1081 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3348 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1037 )
Called from: .\InfoWin.PRG => MAIN( 93 )
System
======
CPU type: Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz 2594 Mhz
Hardware memory: 8085 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 6
1 ,
2 , C:\Desa\Informes Win\InfoWin.exe
3 , C:\WINDOWS\System32\shcore.dll
4 , C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.17763.1282_none_b4b28
5 DDE Server Window, C:\WINDOWS\System32\OLE32.DLL
6 G, C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.17763.1282_none_570de0aec255de
Variables in use
================
Procedure Type Value
==========================
__ERRRT_SBASE
Param 1: O Class: ERROR
TREPORT:ERROR
Param 1: N 13
Param 2: N 1004
Param 3: C "Message not found"
Param 4: C "TREPORT:NLOGPIXELY"
Param 5: N 1
Param 6: O Class: TREPORT
Local 1: U
Local 2: U
(b)HBOBJECT
Param 1: C "Message not found"
Param 2: C "TREPORT"
Param 3: C "NLOGPIXELY"
Param 4: N 1004
TREPORT:MSGNOTFOUND
Param 1: O Class: TREPORT
Param 2: C "NLOGPIXELY"
TREPORT:NLOGPIXELY
Param 1: C "NLOGPIXELY"
TPEN:NEW
REP2
Param 1: N 0
Param 2: N 1
Param 3: N 128
Param 4: O Class: TREPORT
Local 1: S
Local 2: O Class: TPEN
(b)MENU
Local 1: U
Local 2: U
Local 3: U
Local 4: U
Local 5: O Class: TFONT
Local 6: O Class: TFONT
Local 7: O Class: TFONT
Local 8: O Class: TFONT
Local 9: N 0
Local 10: U
Local 11: O Class: TFONT
TMENU:COMMAND
Param 1: O Class: TMENUITEM
TWINDOW:COMMAND
Param 1: N 20010
Local 1: O Class: TMENUITEM
TWINDOW:HANDLEEVENT
Param 1: N 20010
Param 2: N 0
Local 1: N 0
Local 2: N 20010
Local 3: N 0
Local 4: U
_FWH
Param 1: N 273
Param 2: N 20010
Param 3: N 0
WINRUN
Param 1: N 0
Param 2: N 273
Param 3: N 20010
Param 4: N 0
Param 5: N 1
Local 1: O Class: TWINDOW
TWINDOW:ACTIVATE
Param 1: N 12522152
MAIN
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: U
Param 7: U
Param 8: B {|| ... }
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: B {|| ... }
Param 18: U
Param 19: U
Param 20: L .F.
Local 1: O Class: TWINDOW
Local 2: U
Local 3: U
Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFNTX
DataBases in use
================
1: => PASOINF RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
1 256 .F. .F.
Indexes in use TagName
Relations in use
Classes in use:
===============
1 ERROR
2 HBCLASS
3 HBOBJECT
4 TCURSOR
5 TFONT
6 TWINDOW
7 TDIALOG
8 TBRUSH
9 TCONTROL
10 TBITMAP
11 TSAY
12 TGET
13 GET
14 TCLIPGET
15 TBUTTON
16 TRECT
17 TMENU
18 TREG32
19 TMENUITEM
20 TBAR
21 TBTNBMP
22 TMSGBAR
23 TPEN
24 TREPORT
25 TPRINTER
26 TRLINE
27 TRCOLUMN
28 TPREVIEW
29 TSCROLLBAR
30 TMSGITEM
31 TTIMER
32 TIMAGELIST
33 TLISTVIEW
34 TMETAFILE
35 TCOMBOBOX
36 TSTRUCT
Memory Analysis
===============
393 Static variables
Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes