Search code examples
c#printingactivereports

Programatically force printer to print duplicates


I am using Active Reports in C#, and one option we present the users with is to print to a tray where the paper is White/Pink alternating.

Is there a printing method by which I can programatically cause each page to print twice, yet still collate correctly?

Edit:

My intended result is the following pattern:

Page one (white)
Page one (pink)
Page two (white)
Page two (pink)
Page one (white)
Page one (pink)
Page two (white)
Page two (pink)

Thus, each page is duplicated every time it prints.

Currently, I must disable collating and then print double the number of copies the user is asking for. However, the user must then manually assemble the documents.

Thanks for any help!


Solution

  • I see. So your report is by definition has to be duplicated on White and Pink and this duplication needs to be repeated based on users number of copies.

    If you are using Page Reports you can design two page templates one for each "page color", use a master page to share the design elements of the page. You can also control that the pink pages is not visible in the viewer and are print only.

    If you are using Section Reports, you would have to manage the duplication manually in your code. The Document class has a pages collection that you can manipulate, copying the page and inserting it into another location. Before printing you would need to copy p1 and p2 and insert them at the end, your report would now have four pages p1W, p1P, p2W, p2P. if the user prints multiple copies with collation on, everything should come out OK.

    http://arhelp.grapecity.com/webhelp/AR10/index.html#GrapeCity.ActiveReports.Document.v10~GrapeCity.ActiveReports.Document.Section.PagesCollection~Add.html

    hope this helps.
    http://activereports.grapecity.com