PrepareReport multi document very slow

phcphc
edited 8:14AM in FastReport 4.0
I am using Delphi and Fast reports 4 to generate some call sheets. The sheets vary from a single page ( mostly ) up to around 5 pages max.

I set a loop up to process each of the Call sheets from the DB and run the
PrepareReport( False ) function within the loop

If I remove the PrepareReport function from the code it takes 32 sec to process 640 Call Sheets that I am testing.

With the PrepareReport function included the speed deteriorates dramatically
eg
1st min 96 records processed
2nd min 58
3rd min 26
4th min 20
5th min 18
6th min 16

etc

I had one batch of about 1500 Sheets that I was testing which took around 8 hrs to process before the print dialog box appeared. I didn't bother to print to the printer as I am just testing

Does anybody know what can be done to improve the speed of the PrepareReport function ?

Thank's
Pete

Comments

  • gpigpi
    edited 8:14AM
    Try to prepare report on the second TfrxReport and then call frxReport1.PreviewPages.AddFrom(frxReport2) or assign TfrxReport.Dataset with your master dataset

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.