Page 1 of 1

Printing Array

Posted: Tue Apr 15, 2014 5:03 pm
by 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)Â

Printing Array

Posted: Mon Apr 21, 2014 5:35 pm
by 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,

Printing Array

Posted: Mon Apr 21, 2014 9:00 pm
by orangesocks
Hi,
thank you very much for the reply and the explanation.
Regards Giuseppe

Printing Array

Posted: Wed Apr 23, 2014 3:04 pm
by 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

Printing Array

Posted: Wed Apr 23, 2014 4:00 pm
by ignacio
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,

Printing Array

Posted: Wed Apr 23, 2014 7:20 pm
by 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.