Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Duplex printing

edited October 2005 in General
Hi,

I use the Report Builder to generate my database based reports (each
register of the table is a page of the report). Usually, my programs have 2
options: internal side and external side, so who is printing is responsible
for print all the job internal side, and put the paper back to the printer
for the external side.
Because we got many types of reports, they are separeted in *.rtm files,
that are loaded by the "ppReport1.Template.LoadFromFile" function. There are
files for the internal and external sides.

Where are the problem?
But, all printers that i use support duplex printing, in other words, my
work isn't so good. :-(

Now, what I want:
I want to mix these two reports in one unique job, where the first file
loaded will be printed only at the pair pages, and the second file at the
odd pages.

I'm some days working on it with no success. There's any idea?


Thank so much for any help, it will be very good for me to implement duplex
printing to my system.

----------------------------------------------------------------------------
----
Diego de Queiroz Macedo
diegoqueiroz@printmarketing.com.br
----------------------------------------------------------------------------
----

Comments

  • edited October 2005
    Hi Diego,

    Inside the print dialog there is an combo box named "Print What". This box
    allows you to printe either all pages, even pages only, or odd pages only.
    This simply sets the PageRequest.PageRange property of the TppDevice class
    to prOddPages or prEvenPages. Be sure to add ppTypes to your uses clause
    before using these enumerated types.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2005
    Thanks Nico, but yu didn't understand my question.

    What's happening is that the report isn't builded for printing yet.... I
    have to print the first report with all pages and the second report with all
    pages too.
    The problem is that the first page of the finished report should be the
    first page of the first report, the second page of the finished report
    should be the first page of the second report, the third page the finished
    report, the second page of the first report... and this is the way...

    Any new idea??

    ----------------------------------------------------------------------------
    ---- Diego de Queiroz Macedo
    diegoqueiroz@printmarketing.com.br -----------------------------------------
    ---------------------------------------
  • edited October 2005
    Hi Diego,

    Thanks for the further explaination.

    1. It is not possible to print two reports at the same time so you will
    need to combine your two reports into one. I would suggest placing two
    section style subreports inside the main report's detail band containing
    nothing else. These section style subreport will act as each separate
    report.

    2. Take a look at the following example of re-ording the page list. Once
    you print your report, you will need to do something similar to get the
    order of pages you want.

    http://www.digital-metaphors.com/tips/SpreadSheetStyle.zip


    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2005
    Thanks Nico.

    This is exactly what I needed: two separeted reports merged in one, with the
    pages re-ordered like the example, for a duplex printer.
    As I use the reports out of the application (loading the *.rtm files at
    runtime), i just used the "TppSubReport1.Report.Template.LoadFromFile"
    procedure to load the reports at the SubReports.

    Now, my problem is solved.
    Thanks again.

    ----------------------------------------------------------------------------
    ---- Diego de Queiroz Macedo
    diegoqueiroz@printmarketing.com.br -----------------------------------------
    ---------------------------------------
  • edited January 2006
    Hi Diego,

    I downloaded the exact example I gave you and was unable to recreate the
    behavior you are experiencing. The example prints successfully to screen
    and printer. Are you doing anything else that may cause different behavior?
    Multiple copies? Added event code?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2006
    ouch... huge problem...

    The example works fine: the report is generated as it should be generated AT
    THE SCREEN.
    But, when I try to print it on my printer, the pages don't print like they
    should print (they print in a confuse order).
    I supposed that was my mistake, so I used the example to test.
    Result: the example is printing incorrect too (I'm sure that it was
    unchanged before run).

    There is any idea that what's occuring??
    --------------------------------------------------------------------------------
    Diego de Queiroz Macedo diegoqueiroz@printmarketing.com.br Tels: 4135-1014 /
    4135-1017 --------------------------------------------------------------------------------
This discussion has been closed.