Printing 1st copy, 2nd copy...etc, on Invoices

Greetings,

I made a software to print invoices using FastReport

I want the invoice to print with 4 pages all with same information but one field that should read ORIGINAL if it's the 1st page DUPLICATE if is the 2nd, TRIPLICATE and so on

I am doing it now inserting [ReportComment ] on a text field

FrReport1.ReportComment := 'ORIGINAL' ;
frReport1.ShowReport
FrReport1.ReportComment := 'DUPLICATE' ;
frReport1.ShowReport
...
FrReport1.ReportComment := 'QUADRUPLICATE' ;
frReport1.ShowReport

This is not an acceptable solution because the user will have to press the print button 4 times on the pre-view window

Duplicating the information on subreports is not an option either because I am allowing the user to edit the report and also because it can be needed to print as litle as 1 copy or as manny as 20.

The way I am doing it now is to preview the report the first time and print diretcly on the next copies. Also I set a global variable on the OnPrintReport Event to detect if Print has been aborted.

The problem is that the 2nd and next copies will only print after the preview closes.

It would help if I could close the preview after the user presses the print icon

Is there any way to acomplish this in a more elegant way, like setting the number of copies to 4 and having the report to automaticly print 4 pages changing a text field ?

Thanks for any help

Roger

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 9:28PM
    make report rtmultiple and 4 design pages
    ;)
  • edited 9:28PM
    I only said 4 pages as an example.

    The truth is it can be as little as 1 copy or as manny as 10.

    It's not practical to have n design pages of the report when it takes to make changes on it.

    Thanks for your support

    Roger

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.