PDF for Email Problem
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
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
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
be smarter to replace illegal filename characters with an underscore
character whenever it's used for path/filename purposes?
--
Steven S. Weston
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com