FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Report ( error (6) deleting enchanced metafile
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Report ( error (6) deleting enchanced metafile
Posted: Fri Mar 14, 2008 12:31 PM
Estimados

En ocasiones me sale este error ( error (6) deleting )

pero no es por que me falta un ENDPAGE, si no es por que sobrepasa la hoja al parecer, mi consulta es como se hace para que cuando finalize el report me imprima n lineas, que puede se 1 a n..

Lo estoy haciendo Asi y el problema esta en ON END SayMemo2( oReport, aFactu ) ;

ACTIVATE REPORT oReport ;
			ON CHANGE ;
					( ;
					SayMemo( oReport, aCentral[nPos,7] ),;
					);
			ON END SayMemo2( oReport, aFactu )  ;
			WHILE nPos <= Len( aCentral )

static Function SayMemo( oReport, aArray )

	if !empty( aArray )
		aEval( aArray, { |x| ;
							;
							oReport:StartLine(),;
							oReport:Say(1,space(5)+x[1]),;
							oReport:Say(3,padr(x[2],25)),;
							oReport:Say(4,x[3]),;
							oReport:Say(5,x[4]),;
							oReport:Say(6,x[5]),;
							oReport:EndLine();
							} )
	endif

return( nil )
//----------------------------------------------------------------------------------------------------
static Function SayMemo2( oReport, aArray )
	local cLine, lEnd := .f.

	if !empty( aArray )
		aEval( aArray, { |x| ;
							;
							oReport:StartLine(),;
							oReport:Say(1,space(5)+x[1]),;
							oReport:Say(3,padR(x[2],25)),;
							oReport:Say(4,trans(x[3],"99,999,999") ),;
							oReport:Say(5,trans(x[4],"99,999,999") ),;
							oReport:EndLine();
							 } )
	endif

return( nil )
//----------------------------------------------------------------------------------------------------
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Report ( error (6) deleting enchanced metafile
Posted: Fri Mar 14, 2008 02:04 PM

Patricio:

El problema se presenta cuando imprimes más alla del final de la página, intenta ampliando el márgen inferior del reporte o utiliza el siguiente código por cada línea impresa en la función SayMemo2

IF oReporte:NeedNewPage()
oReporte:EndPage()
oReporte:StartPage()
ENDIF

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
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Report ( error (6) deleting enchanced metafile
Posted: Fri Mar 14, 2008 03:29 PM
Gracias armando por responder

segui tus indicaciones pero aun sale el error..

static Function SayMemo2( oReport, aArray )

	if !empty( aArray )
		aEval( aArray, { |x| ;
							;
							iif( oReport:NeedNewPage(),(oReport:EndPage(), oReport:StartPage()), NIL  ),;
							oReport:StartLine(),;
							oReport:Say(1,space(5)+x[1]),;
							oReport:Say(3,padR(x[2],25)),;
							oReport:Say(4,trans(x[3],"99,999,999") ),;
							oReport:Say(5,trans(x[4],"99,999,999") ),;
							oReport:EndLine();
							 } )
	endif

return( nil )
//----------------------------------------------------------------------------------------------------


ahora probando esto
static Function SayMemo2( oReport, aArray )
	local nStdLineHeight := oReport:nStdLineHeight

	if !empty( aArray )
		aEval( aArray, { |x| ;
							;
							iif( oReport:NeedNewPage( nStdLineHeight ),(oReport:EndPage(), oReport:StartPage() ), NIL  ),;
							oReport:StartLine(),;
							oReport:Say(1,space(5)+x[1]),;
							oReport:Say(3,padR(x[2],25)),;
							oReport:Say(4,trans(x[3],"99,999,999") ),;
							oReport:Say(5,trans(x[4],"99,999,999") ),;
							oReport:EndLine();
							 } )
	endif

return( nil )


igual sale el error pero por lo menos lanza una segunda pagina :-)

si alguien tiene otra solucion es bienvenida
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Report ( error (6) deleting enchanced metafile
Posted: Fri Mar 14, 2008 04:02 PM

Patricio:

Yo intentaría ponerlo despues de imprimir:

static Function SayMemo2( oReport, aArray )
local cLine, lEnd := .f.

if !empty( aArray )
aEval( aArray, { |x| ;
;
oReport:StartLine(),;
oReport:Say(1,space(5)+x[1]),;
oReport:Say(3,padR(x[2],25)),;
oReport:Say(4,trans(x[3],"99,999,999") ),;
oReport:Say(5,trans(x[4],"99,999,999") ),;
oReport:EndLine();
IIF(oReporte:NeedNewPage(),;
(oReporte:EndPage(),oReporte:StartPage()),)} )
endif

return( nil )

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

Continue the discussion