Re-generate the report from script

Hello Everybody!

I have a very annoying problem, that I blowing my mind on for a week. I'd like to print invoices. The number of instances are received from the Delphi program via report variables and I set the Page's PageCount property to this value. It works just fine.

BUT. Many times I print a large amount of invoices and - for increasing the speed of the whole process - I don't use separate print jobs for the invoices, so I call the PrepareReport method with ClearLastReport set to False and at the end there is one call to Print. It is much more faster than separate print calls.

But the heavenly solution would be the following: everything would be the same, but I would call the whole report generation again and again inside the report-file in the code section, with the different invoice IDs.

So, my question is: is it possible to re-generate the report many times via script and add these pages to the generated metafiles?

TIA: Alex :-)

Comments

  • edited 1:29PM
    basswar wrote: »
    ...
    BUT. Many times I print a large amount of invoices and - for increasing the speed of the whole process - I don't use separate print jobs for the invoices, so I call the PrepareReport method with ClearLastReport set to False and at the end there is one call to Print. It is much more faster than separate print calls.
    ...

    Does the above mean that your Delphi program knows which invoices should be printed in one print job (I mean all invoices to be seen in the same one large Preview before being printed)?
    If so I suggest you to create a table (or temporary table) with IDs of all invoices you need to print alltogether. If you don't like or can't work with database tables you may pass a report variable (containing those IDs) to your report. Then you'll have to modify a bit your report, but IMO that's the simplest way.

    Regards
    Mick

  • edited 1:29PM
    Hello Mick!

    Yes, it means exactly that. I store the selected IDs in a FireBird global temporary table and everything is OK. I just would like to put all neccessary processing inside the report.

    Thanx for your reply!!

    Alex :-)

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.