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

Multiple reports into a PDF

edited September 2009 in General
I've seen the information at
http://www.digital-metaphors.com:8080/Output/PDF/How_To...Merge_Multiple
_Reports_into_one_PDF but have a question.

I already have a lot of reports that are produced individually, and
save in a folder as archive raf files.

I want to load them each in turn and save them as PDF, so I'm doing
something simiular to that shown but am using a single ReportReader to
load the raf files and print to the PDF device, one at a time but
whilst the final PDF ends up with the right number of reports, each one
is the first one repeated.

Might I be missing something, if so what?

Thanks
Jeremy Knowles

Comments

  • edited September 2009
    Hi Jeremy,

    I have not seen your code but it seems the ArchiveReader is not properly
    loading the separate archive files each time it prints. Be sure that the
    correct archive file is indeed being loaded each time you make a call to
    ArchiveReader.PrintToDevices.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2009
    Nico Cizik (Digital Metaphors) wrote:


    Nico

    Thanks, that helped and I've got it to work great, which means I've
    removed the need for the PDF Merging component I was using previously.

    One final question - is it possible to get the archivereader to update
    the ArchivePageCount property without actually printing it? The reason
    I ask is because I need to check the number of pages of each report to
    allow me to create the contents page, and currently I am using the
    archiver to check this but I have to create another temporary file to
    get it to work (previously this created the PDF with the Waler
    component so I just picked up the pages after doing that).

    Thanks, and thanks too for getting the Delphi 2010 update out so soon,
    all is working great!

    Jeremy
  • edited September 2009
    Hi Jeremy,

    The ArchiveReader gets the ArchivePageCount information from the header of
    the Archive file. Take a look at TppCustomArchiveReader.ReadHeader for how
    this is done and how you might access the information yourself. This is
    however meant to be determined when the archive is printed.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.