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

ArchivQuestion

edited June 2006 in General
Hi!

As far as I understand the Archiv-file-format contains the Report in a
Report-native-format. (I use RB7 with D5)

A) Is this file-format downwards compatible in other words can RB10
read RB7-ARchivfiles?

B) I want to save every Report to a History-Database when the Report is
printed or emailed or exported. Only Preview should make nothing. Is
the only way to print EVERY Report to a temporary archivfile also just
for previewing and than print or export it from the ArchiveViewer, or
can I get an actuall Archiv-file from a current TppReport?

Gruß aus den Bergen
Günter

Comments

  • edited June 2006
    Hi Gunter,

    All archive files that are created with native drawcommands are backward
    compatable with RB 10. If for instance you used a third party component
    such as a rotated label, you will need to have that component installed for
    the archive to print successfully.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    Hi!

    Sounds good.

    Another question: I would like to add a 'REPRINT ON ' on every
    page when somebody is printing from the archiv-file? Is this possible?

    Gruß aus den Bergen
    Günter
  • edited June 2006
    Hi Gunter,

    An archive file is meant to be a snapshot of a report that has already been
    generated. It is possible to manually add a drawcommand into the page
    object before the page is generated using the Device.OnPageReceive event.
    You will need to implement this event for the device being used in order to
    accomplish what you need.

    ppArchiveReader.PrinterDevice.OnPageReceive

    TppViewer(ppArchiveReader.PreviewForm.Viewer).ScreenDevice.OnPageReceive

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    Hi again!

    Another question:
    The orginal Report was TwoPass but when I repreview the report from
    Archiv it seams to be a onepass-report. I see only Page 1 and not Page
    1 of 2.
    How can I change this?

    Gruß aus den Bergen
    Günter
  • edited June 2006
    Hi Gunter,

    The archive is just a snapshot of a report that was previously generated.
    The text you see for the system variable is not being calcuated, it is
    simply displaying as it did when the report was generated to the archive
    file. You would need to re-generate the archive file to fix this.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    In article <449ad3d8$1@dellsc1420.>, Nico Cizik (Digital Metaphors) wrote:

    Hmmm, do you have any example for this?

    Gruß aus den Bergen
    Günter
  • edited June 2006
    In article <449ae271@dellsc1420.>, Nico Cizik (Digital Metaphors) wrote:

    The text 'Page ...' Is on the bottom of the viewer, not on the Report. With
    the normal viewer is see 'Page 1 of 2' but with the viewer from the
    ArchiveReader is is only 'Page 1' and when I press next page there comes
    'Page 2 of 2'. But I would prefer to see the total pages also on the first
    page.

    Gruß aus den Bergen
    Günter
  • edited June 2006

    I created a simple example that shows how to add a draw command to each
    page...

    www.digital-metaphors.com/tips/ArchiveReaderAddDrawCommand.zip



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2006
    In article <44a051aa$1@dellsc1420.>, Nard Moseley (Digital Metaphors)
  • edited June 2006

    - I enhanced the example to show screen and printer. Try downloading again

    www.digital-metaphors.com/tips/ArchiveReaderAddDrawCommand.zip

    - I used the ArchiveReader.BeforePrint event to get a reference to the
    screen or printer device and attach the OnPageReceive event-handler

    Example:

    procedure TForm1.ppArchiveReader1BeforePrint(Sender: TObject);
    var
    lRasterDevice: TppRasterDevice;
    begin

    // get reference to the screen or printer device
    if (ppArchiveReader1.PrinterDevice <> nil) then
    lRasterDevice := ppArchiveReader1.PrinterDevice
    else if (ppArchiveReader1.PreviewForm <> nil) then
    lRasterDevice :=
    TppViewer(ppArchiveReader1.PreviewForm.Viewer).ScreenDevice
    else
    lRasterDevice := nil;

    // attach handler to device OnPageReceive event
    if (lRasterDevice <> nil) then
    lRasterDevice.OnPageReceive := ehPageReceive;

    end;



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.