How to print a PageStyleReport to archive including the PageStyle?
Hello,
in my application I'm adding a PageStyle report to my MainReport. I've just
tried to print such a PageStyleReport to an archive file, though the archive
file contains the main report only, the PageStyle is gone.
I need to do it temporarily, since I need the archive file for a sample
project, where I can't use everything from the original project due to non
standard components I'm using there.
So I've just added a button in my form and once the MainReport and the
PageStyleReport are loaded / merged, I'm doing this to save the archive
file:
ppReportMain.AllowPrintToArchive := true;
ppReportMain.ArchiveFileName := 'D:\ReportMain.raf';
ppReportMain.DeviceType := 'ArchiveFile';
ppReportMain.Print;
But as I said: it doesn't work properly, since the PageStyleReport is gone.
How can I accomplish that?
I'm using RB 11.08, Delphi 2007.
Regards,
Mark Stein
in my application I'm adding a PageStyle report to my MainReport. I've just
tried to print such a PageStyleReport to an archive file, though the archive
file contains the main report only, the PageStyle is gone.
I need to do it temporarily, since I need the archive file for a sample
project, where I can't use everything from the original project due to non
standard components I'm using there.
So I've just added a button in my form and once the MainReport and the
PageStyleReport are loaded / merged, I'm doing this to save the archive
file:
ppReportMain.AllowPrintToArchive := true;
ppReportMain.ArchiveFileName := 'D:\ReportMain.raf';
ppReportMain.DeviceType := 'ArchiveFile';
ppReportMain.Print;
But as I said: it doesn't work properly, since the PageStyleReport is gone.
How can I accomplish that?
I'm using RB 11.08, Delphi 2007.
Regards,
Mark Stein
This discussion has been closed.
Comments
looks as if only images and lines of the PageStyleReport are gone (ppImages,
ppLines in my case). The text (ppMemos) is in the archive file. Not sure if
other elements would be there or gone, since I'm using only those 3 types.
Images in general seem to be not a problem, since my MainReport contains
some of them in the DetailBand and they are in the archive file too.
Hope that helps,
Mark
The archive device retrieves each generated TppPage object similar to other
devices, then writes the entire page (which includes all drawcommands for
that page) to file using the TStream.WriteComponent routine. This means it
is not possible for the Archive device itself to exclude certain
drawcommands. Anything missing is simply not present on the page when the
report is printed/exported.
Try tracing your event code that loads the subreport(s) to the page style
band to be sure everything is being properly executed during the export to
Archive.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com