Hello Dean,
I reviewed your post carefully, and now I'd like to share the following
information with you:
1. I recommend you create a "Save File" dialog of you own (by using
System.Windows.Forms.FileDialog class) to limit the use to select pdf file
type, and then export the Crystal Report to a pdf file with the following
code snippet:
//------------------code snippet--------------------------
ExportOptions exportOpts = new ExportOptions();
DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions();
exportOpts = myRPT.ExportOptions;
diskOpts.DiskFileName = @"C:\...pdf";
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat;
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;
exportOpts.DestinationOptions = diskOpts;
myRPT.Export();
//----------------------end of-------------------------------
2. According to the Crystal Decision at
http://support.crystaldecisions.com/...fault.asp_sele
ctlist, it states that you get two Crystal incidents with the purchase of
Visual Studio .NET. I suggest that you can contact Crystal Technical
Support to check whether there are any methods that you can use to limit
file types in its "Save As" dialog (say, by modifying registry values).
If the file type values are hard-coded in Crystal Report, you may need to
call FindWindow() to get the Window Handle to its "Save As" dialog, and
then modify the dialog manually. This should be the last resort.
Please feel free to let me know if you have any problems or concerns.
Have a nice day!
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! ¨C
www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.