Problems with OwnPreview

FastReport for Xailer & [x]Harbour (English/Spanish)
Responder
Avatar de Usuario
bingen
Mensajes: 565
Registrado: Lun Jul 07, 2014 8:17 pm
Ubicación: Bilbao
Contactar:

Problems with OwnPreview

Mensaje por bingen »

Hi Xailer Team.

There is a problem with a FR inside a owner preview, you can test it with Samples\FastReport\OwnPreview.xpj

All goes ok if you print once, if you try twice nothing goes, no print and no error.

:shock:
BiSoft Desarrollo de software profesional
http://www.bisoft.es
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9255
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Problems with OwnPreview

Mensaje por ignacio »

Hi,

Not able to reproduce you error. Please indicate the exact operations to reproduce your error on sample \FastReport\OwnPreview. TIA.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
bingen
Mensajes: 565
Registrado: Lun Jul 07, 2014 8:17 pm
Ubicación: Bilbao
Contactar:

Re: Problems with OwnPreview

Mensaje por bingen »

It's easy

Open the project Samples\FastReport\OwnPreview.xpj and run, make click over [Print] button and print the document on paper or to a Pdf printer, all goes OK.

Now, try to print a second copy... [Print] do not run.

Thanks
BiSoft Desarrollo de software profesional
http://www.bisoft.es
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9255
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Problems with OwnPreview

Mensaje por ignacio »

Not so easy. I'm a afraid. :-(

Just push the Show button before pushing the Print button again. If you have to blame someone, blame on Fast-Repport.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
bingen
Mensajes: 565
Registrado: Lun Jul 07, 2014 8:17 pm
Ubicación: Bilbao
Contactar:

Re: Problems with OwnPreview

Mensaje por bingen »

Ok "solved"

If someone wants to print twice, before print a new copy I send a fr:Show(), ugly but effective.

But, in FR's original preview works well.
BiSoft Desarrollo de software profesional
http://www.bisoft.es
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9255
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Problems with OwnPreview

Mensaje por ignacio »

Hi,

Our code is strictly a call to the FR print method and we do not anything else. So, is not our fault. I guess FR recreates the report if has been already printed. That's all.

Regards,

Código: Seleccionar todo

XA_FUNC( XFASTREPORT_PRINTC )
{
   static Print pFunction = NULL;
   PHB_ITEM Self = hb_stackSelfItem();
   BOOL lSuccess = FALSE;
   long pObject = XA_ObjGetNL( Self, "pObject" );

   if( pObject )
   {
      if( !pFunction )
         pFunction = (Print) GetProcAddress( hLib, "Print" );

      if( pFunction )
         lSuccess = ( pFunction )( pObject );
      else
         SetError( 125, "Exported function Print() not found in DLL" );
   }

   hb_retl( lSuccess );
}
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Responder