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

Writing to an archive

edited August 2006 in General
Hi,

I'm trying to write my report to an archive and then exporting the .raf file
to PDF with the pragnaan exporter.
The problem is that there is always just one page in the Archive.

Code:

procedure PrintPages;
lDevice : TmyDevice;
i : integer;
begin
ppReport1.ShowPrintDialog := False;
ppReport1.DeviceType := dtArchive;
ppReport1.ArchiveFileName := 'c:\test.raf';

lDevice := TmyDevice.Create(Self);
lDevice.EndPrintJob := False;
lDevice.Publisher := ppReport1.Publisher;

for i := 0 to CmboBxInstitutions.Items.Count -1 do
begin
PrintToDevices;
lDevice.Reset;
lDevice.StartPrintJob := False;
if i = CmboBxInstitutions.Items.Count -1 then
lDevice.EndPrintJob := True
else
lDevice.EndPrintJob := False;
end;
ExportArchiveToFile('C:\Test.raf','C:\Test.pdf',ofPDF,True,True,False);
end;

The TmyDevice is a copy of the TmyPDFDevice from examples I used before only
this one is of the class TppDevice instead of TppPDFDevice.

This always just shows the last page of the report.

Thanks

Comments

  • edited August 2006
    Hi Valdimar,

    Have you been able to contact the Pragnaan staff yet? As I mentioned
    before, I do not have access to their source code and therefore do not know
    how they are processing each page inside their StartJob and EndJob
    overridden routines. Since you are essentially overriding some of their
    routines with your custom device, you may need to add some of their code to
    your routines to get a proper output.

    --
    Regards,

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

    Best Regards,

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

    I have sent repeated mails to their support mail but no answer yet.
    I beginning to think I should have bought something a bit more expensive
    since then I would probably have gotten some support (or at least an answer
    to my e-mails).


  • edited August 2006
    I'm not so sure the problem is with the pragnaan stuff though.
    It seems that the raf file gengerated by my code is always 32kb whether I'm
    gengerating 1 or 20 pages.
    I can't open this raf file with anything to check it but I really don't need
    to. It ought to be a lot bigger than 32 kb with 70+ pages inside.

    The pragnaan exporter opens the last page perfectly so I'm thinking it must
    be a problem with the archive writing.

This discussion has been closed.