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)
User avatar
orangesocks
Posts: 55
Joined: Thu May 05, 2011 3:28 pm

Printing Array

Postby orangesocks » Tue Apr 15, 2014 5:03 pm

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)Â
User avatar
ignacio
Site Admin
Posts: 8545
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

Printing Array

Postby ignacio » Mon Apr 21, 2014 5:35 pm

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]
http://www.xailer.com
http://www.xailer.info
User avatar
orangesocks
Posts: 55
Joined: Thu May 05, 2011 3:28 pm

Printing Array

Postby orangesocks » Mon Apr 21, 2014 9:00 pm

Hi,
thank you very much for the reply and the explanation.
Regards Giuseppe
User avatar
orangesocks
Posts: 55
Joined: Thu May 05, 2011 3:28 pm

Printing Array

Postby orangesocks » Wed Apr 23, 2014 3:04 pm

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
User avatar
ignacio
Site Admin
Posts: 8545
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

Printing Array

Postby ignacio » Wed Apr 23, 2014 4:00 pm

orangesocks escribió el mié, 23 abril 2014 15:04
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

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]
http://www.xailer.com
http://www.xailer.info
User avatar
orangesocks
Posts: 55
Joined: Thu May 05, 2011 3:28 pm

Printing Array

Postby orangesocks » Wed Apr 23, 2014 7:20 pm

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.

Return to “FastReport”