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

Calling Rob Segerink for "ArchiveStreamReader"

edited March 2004 in General
In one of the posts in last October Rob Segerink has said that he has an
archive reader that reader from streams. I am interested in getting this
utility.
I e-mailed him but no response. I am posting this in a new thread in order
to catch his attention or somebody who may have that utility.

Thanks in advance,
Vikram

Comments

  • edited March 2004
    Hi Vikram

    you can download it from here :

    http://www.147soft.no-ip.com/unit_archivestream.zip

    It is certainly not perfect, but it does work for me.

    greetings,

    Rob

  • edited March 2004
    Thank you very much, Rob.

    Vikram

  • edited March 2004
    I am trying to use the ArchiveStream device but am unclear as to how to
    assign it to the report and read the resultant archive stream back.

    Specifically, how do I use the TppStreamDevice and TppArchiveStreamDevice
    classes? How do I link it with the report component.

    Thanks,
    Vikram

  • edited March 2004
    Hi Vikram,

    use something like the code below, where MD is a TextraDevice
    component, if you don't have it just delete the part where this is used,
    just look at the part where the TppArchiveStreamDevice (which you can
    find in the Unit_archivestream.pas) is used. :

    type
    TDeviceFormat = (dfRAF, dfHTML, dfPDF, dfCSV, dfRTF, dfXLS, dfWK1, dfWQ1,
    dfPRN);

    procedure TReportage.ExportReportToStream(AReport: TppProducer;
    DeviceFormat: TDeviceFormat; Stream: TStream);
    var
    MD: TExtraDevice;
    AD: TppArchiveStreamDevice;
    begin
    if DeviceFormat <> dfRaf then
    begin
    MD := DeviceFormatToObject(DeviceFormat);
    if MD <> Nil then
    begin
    ExtraDevices.HTML.SingleFileOutput := True;
    MD.PrintToStream := True;
    MD.ReportStream := Stream;
    MD.Publisher := AReport.Publisher;
    AReport.PrintToDevices;
    MD.Free;
    end
    end
    else
    begin
    AD := TppArchiveStreamDevice.Create(nil);
    try
    //AD.ReportStream := Stream;
    AD.Publisher := AReport.Publisher;
    AReport.PrintToDevices;
    Stream.CopyFrom(AD.ReportStream, 0);
    finally
    AD.Free;
    end;
    end;
    end;

    greetings,

    Rob


  • edited March 2004
    That works. Thank you very much, Rob. You have been very helpful.

    Vikram
This discussion has been closed.