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

Best way to Archive report transparently.

edited January 2005 in General
I need to preserve a copy of reports to an archive. When the user
prints the report I want another copy to go to the archive (.raf) file,
but I want it to be transparent to the user.

Currently I have a base report that has a method
PrintToArchive(FilleName: string); The calling form prints the first
visual copy of the report with MyReportForm.Print (which calls
ppReport.Print) and then I follow that with
MyReportForm.PrintArchive(FileName) which sets ShowPrintDialog to
false, sets archivefile name, output device to dtArchive and prints.
This all works quite well but I am concerned that I am actually
printing the report twice, with all the overhead that entails, as
opposed to just making a copy of the first visual report.

Is there are way to print a copy to archive as the user closes the
first report without having the expense of generating a new report for
the archive. Also I am using report templates stored in the databae so
I don't have access to the ppReport handles unless I add them to the
template, I suppose. If this is possible a simple code example would
be appreciated.

--
David Farrell-Garcia
Whidbey Island Software LLC

Posted with XanaNews 1.17.1.2

Comments

  • edited January 2005
    We do a similar thing. All you need to do is to first generate the report
    only to Archive format. then load up the archive reader to convert the
    archive report to whatever format you want.

    Vikram


  • edited January 2005
    Vikram Kulkarni wrote:


    Thanks for the tip. That does seem more efficient.

    --
    David Farrell-Garcia
    Whidbey Island Software LLC

    Posted with XanaNews 1.17.1.2
This discussion has been closed.