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

Add drawcommands without TppArchiveReader.Print

edited September 2009 in General
Hi,

I have 2 reports (RAF) on disk. I have to add 1 DrawCommand per page to each
of those reports. After that i need to merge both reports + additional
DrawCommand per report to a 3d report using TkuRAFMerge (no problem here)
and print the 3d report. How can i add a DrawCommand per page for both
reports (RAF) on disk withouth using TppArchiveReader.Print.

Greetings,
Filip Moons

Comments

  • edited September 2009
    Hi Filip,

    There is no simple way to simply add a drawcommand to an archive file
    without doing it at runtime while the device is receiving pages. Would it
    be possible to add the drawcommands when you are printing the 3rd (merged)
    report?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2009
    Sure, if you can tell me how i can find out which page belongs to which
    report

  • edited September 2009
    Hi Filip,

    If I understand the rafMerger utility correctly, once the archive files are
    merged, there is no distinction between the two. Perhaps you can use the
    OnReceivePage event to take a look through the drawcommands and use that
    information to determine which archive you are printing. Another option,
    since you are using archives, would be to keep track of the number of pages
    each individual archive and use that to determine which archive is being
    printed.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2009
    Hi Nico,

    I merged 2, 1 page only, reports. First the 2 reports are merged to a 3the
    report. I use TppCustomArchiveReader.OnReadPage linked to the merged report
    to view it in screen. At runtime during this event
    TppPage(aPage).AbsolutePageNo has consecutive values 3 and 4 while i only
    have a 2 page report. The viewer shows 'Page 1 of 2' in its statusbar. I
    checked the first 4 bytes to get number of pages from both streams, both
    indicate a 1 page only report. I tried the same with some other reports.
    When merging 5 ,1 page only, reports TppPage(aPage).AbsolutePageNo varies
    from 1 to 4 and yes the viewer shows 5 pages. TppPage(aPage).AbsolutePageNo
    is no way accurate to depend on in the TppCustomArchiveReader.OnReadPage
    event. What am I missing here?

    Greetings,
    Filip Moons



    1 page onlyade a quick test to see if
    TppCustomArchiveReader.OnReadPage

    }



  • edited September 2009
    Ok, finally figured out what was wrong. TppPage(aPage).AbsolutePageNo is
    only set after the OnReadPage is executed. I need to use
    TppArchiveReader(Sender).ArchivePageNo in the event itself to get the right
    pagenumber.

This discussion has been closed.