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

PDF for Email Problem

edited January 2009 in General
Using D2007 and RB 11.2.

If this setting is made:
PrinterSetup.DocumentName := 'Officers/Inspectors Listing';
which has a slash character, then RB attempts to create a PDF filename using
a back-slash:
'C:{user dir}\Officers\Inspectors Listing.pdf' which produces an invalid
folder error. If I continue (in debug mode), RB tries this filename:
'C:{user dir}\Officers/Inspectors Listing.pdf' but does not continue to
display the email client.

--
Steven S. Weston

Comments

  • edited February 2009
    Hi Steve,

    By default, if no file name is defined for the Report.EmailSettings.FileName
    property, the PrinterSetup.DocumentName is used. If there are front or back
    slashes in this name, Windows will automatically assume a directory is
    implied.

    To work around this issue, be sure the EmailSettings.FileName property is
    always defined or remove all slash characters from the DocumentName
    property.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2009
    Since DocumentName is not intended to be a path/filename, perhaps it would
    be smarter to replace illegal filename characters with an underscore
    character whenever it's used for path/filename purposes?

    --
    Steven S. Weston
  • edited February 2009
    Thanks for the feedback. We will add this for the next maintenance release.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.