FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Extraño bug al imprimir
Posts: 1818
Joined: Wed Oct 26, 2005 02:49 PM
Extraño bug al imprimir
Posted: Tue Feb 03, 2026 04:40 PM

Hola buenos días para todos, estamos generando un informe apoyándonos en Easy Report, en la vista previa se ve de manera correcta, pero al enviar la impresión a la impresora (valga la redundancia), no se imprime la imagen que tenemos de fondo en la primera página.

El código

***************************************************
//AQUI HACEMOS LA IMPRESIÓN DE LA CARTA DE GARANTIA
oVRD:oPrn:PrintImage( 0, 0, cRutaLogo, aPgSize[1] , aPgSize[2] +3 , .T. ,-5 , .T. , ,"MM" )
PRINTAREA 5 OF oVRD 
nContar++
PAGEBREAK oVRD

oVRD:oPrn:PrintImage( 0, 0, cRutaLogo2, aPgSize[1] , aPgSize[2] +3 , .T. , , , ,"MM" )
PRINTAREA 6 OF oVRD ITEMIDS { 601,602,603,604,605,606,607,608,609} ;
ITEMVALUES  { alltrim(oRsFtr:Fields( "ll_nombre" ):Value),;
			 substr(alltrim(oRsFtr:Fields( "ll_direcc" ):Value),1,40),;
			 alltrim(oRsFtr:Fields( "ll_telefo" ):Value),;
			 alltrim(oRsFtr:Fields( "ll_correo" ):Value),;
			 alltrim(cSeri),;
			 alltrim(cMode),;
			 alltrim(cInga),;
			 alltrim(cFnga),;
			 substr(cArti+" - "+cNomb,1,40);
			 }

Lo raro es que la segunda hoja, que también tiene una imagen de fondo, si sale correctamente.

Gracias de antemano si alguien tiene idea sobre como solucionarlo.

Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Extraño bug al imprimir
Posted: Tue Feb 03, 2026 05:10 PM

Dear Leandro, I remember having solved this in a similar way before: by defining a dedicated PRINTAREA that is not positioned relative to previous areas.

The idea was to create a fixed-position area that covers the entire page and is used only for the background image. This area has TopVariable = 0, Top1 = 0, and a height equal to the full page size, so it is completely independent from the layout flow of the other areas.

The background image is then defined as an IMAGE item inside this area, instead of calling PrintImage() directly.

Because this area is printed within the normal EasyReport area lifecycle (after StartPage()), the image is rendered correctly both in preview and on the physical printer.

In my experience, this avoids timing issues on the first page and keeps preview and print output consistent.

Best regards, Otto

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Extraño bug al imprimir
Posted: Fri Feb 20, 2026 03:34 AM

Amigo Leandro:

Tuve un problema parecido con una impresora de TICKETS de venta, algunos datos los imprimo en color ROJO, cuando mi cliente cambio de PC usando la misma impresora los datos en color rojo ya no se imprimen, en la vista previa si aparecen.

Lo cual me hizo pensar que los DRIVERS de la impresora no eran los correctos.

Tal vez te esta pasando lo mismo

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