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

PDF creation failing on > 100 reports

edited July 2008 in Devices
I need to create LOTS of separate pdfs from the accounts where data is
stored in a tables. Some accounts only need 20-50 pdfs created, but some
are over 100.

While looping through an account, the pdfs are written to a tmp file and
immediately added to a zip file before proceeding to generating the next
pdf. Also, I'm using TExtraDevices. After 100+ pdf's are created, I get an
exception that halts everything. "TppProducer.PrintToPrinter: The file
device has already been created.". If I genearte less than 100, no
exception is thrown. Any ideas?


I have this set.
frmVisit.ppReport.DeviceType := 'PDFFile';
frmVisit.ppReport.PDFSettings.OpenPDFFile := False;
frmVisit.ppReport.AllowPrintToFile := True;
frmVisit.ppReport.ShowPrintDialog := False;
frmVisit.ppReport.ShowCancelDialog := True;
frmVisit.ppReport.ShowAutoSearchDialog := False;

frmVisit.ppReport.PDFSettings.Author := '';
frmVisit.ppReport.PDFSettings.Title := '';

Jim

Comments

  • edited July 2008
    Hi Jim,

    This is not a known ReportBuilder issue however you might try contacting
    Waler support directly to see if they have heard of it. Have you tried
    using the built-in PDF device?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2008
    I may have solved it, but not sure. Although I wanted only a PDF to be
    created, I notice the default print queue getting filled with hundreds of
    jobs. So,
    what I did before calling 'Print', I set the
    ppreport.printersetup.printername = ''.

    Now, I don't get the the print queue loaded, the PDFs get created
    correctly and I have no errors. Is there some setting that I'm over looking
    to keep more than
    one device from being honored?

    BTW: The problem existed with the built-in PDF device as well.

    Thanks
    Jim
  • edited July 2008

    This is not a known issue. By design, generating a report to the printer or
    file should be mutually exclusive. To print to multiple devices should
    require special code.

    If you would like to create a simple focused test case, we can check it out
    here using RB 10.09 and the Delphi debugger. Please use standard Delphi
    components, RB, and the DBDemos data. Send in zip format to
    support@digital-metaphors.com

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

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