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.

Printing Array

FastReport for Xailer & [x]Harbour (English/Spanish)
Responder
Avatar de Usuario
orangesocks
Mensajes: 59
Registrado: Jue May 05, 2011 3:28 pm

Printing Array

Mensaje por orangesocks »

Hello,
I have a strange problem with a report that prints an array.
The first time I run the report the data is printed correctly. The subsequent times even if I send different data the output doesn't change.
I'm new to FastReport, I just bought it and surely I'm doing something wrong.
Please have a look at the sample attached, because I really need this feature in a project I'm developing.
Regards
Giuseppe
[Update]
I also noticed that in this sample direct printing is not working.

Attached files TestFrx.zip (3.6 KB)Â
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Printing Array

Mensaje por ignacio »

Dear Sir,
The strange data problem gets fixed just including this line after the print (or whatever):
TFastReport:End()
This occurs because FastReport keeps track of all open memory datasets by its name. For this reason is necessary to destroy the report object if any other report uses a different dataset but with its same name. BTW, is really a very good practice destroying the objects after using them.
Due the complexity of the FR engine is not possible to use the automatic destructor. Anyway, we do not like to much. Xailer never uses for example.
About the direct print problem. A call to PrepareReport() must be done before printing the report. BTW we will include a call to that method on the Print() code in case it has not been called.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
orangesocks
Mensajes: 59
Registrado: Jue May 05, 2011 3:28 pm

Printing Array

Mensaje por orangesocks »

Hi,
thank you very much for the reply and the explanation.
Regards Giuseppe
Avatar de Usuario
orangesocks
Mensajes: 59
Registrado: Jue May 05, 2011 3:28 pm

Printing Array

Mensaje por orangesocks »

Hi,
following up my tests, I came along another problem.
I have to print an array with 150 elements more or less and the report only displays the first 100.
Is there a limit on the number of the elements of an array that can be printed ?
Regards Giuseppe
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Printing Array

Mensaje por ignacio »

orangesocks escribió el mié, 23 abril 2014 15:04Hi,
following up my tests, I came along another problem.
I have to print an array with 150 elements more or less and the report only displays the first 100.
Is there a limit on the number of the elements of an array that can be printed ?
Regards Giuseppe
That is a know bug on your actual version that only happens when printing or previewing the report after a design operation. We expect to publish a new version really soon. A workaround is to set the property oTRDataset:nMaxRecsOnDesign to zero. Sorry for any inconvenience.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
orangesocks
Mensajes: 59
Registrado: Jue May 05, 2011 3:28 pm

Printing Array

Mensaje por orangesocks »

Hi Ignacio,
No problem at all.
But this limitation appears during report design and also when I preview or print the report directly.
Just tried your suggestion and everything is working. Thanks
Regards, Giuseppe.
Responder