Sending email with specified export type and EmailExport.ShowDialog()
Tasos Savva
Cyprus
I have the following code
I've noticed after several tries that setting
Does anyone knows how can I keep the settings that I pass to pdf as the default and let the user change them if needed?
Thanks
Config.ReportSettings.ShowProgress = false;
FastReport.Export.Pdf.PDFExport pdf = new FastReport.Export.Pdf.PDFExport();
FastReport.Export.Email.EmailExport email = new FastReport.Export.Email.EmailExport();
email.Account.AllowUI = true;
email.Account.Name = "CompanyName";
pdf.AllowModify = false;
pdf.Compressed = true;
pdf.EmbeddingFonts = false;
pdf.Background = false;
pdf.GradientQuality = FastReport.Export.Pdf.PDFExport.GradientQualityEnum.Low;
pdf.JpegCompression = true;
pdf.JpegQuality = 80;
pdf.PrintOptimized = false;
pdf.Name = "pdf";
email.Export = pdf;
if (email.ShowDialog() == DialogResult.OK)
      email.SendEmail(Report);
I've noticed after several tries that setting
email.Export = pdf
does not have any effect after calling
email.ShowDialog()
Does anyone knows how can I keep the settings that I pass to pdf as the default and let the user change them if needed?
Thanks
Comments
Hello, this will do the same thing, you have just rewrite the code using using.
I need to set pdf properties before calling email.ShowDialog() and use those settings.
then you have two options:
1.upgrade to the latest version
2.create your own code, export pdf to stream, email with System.Net.Mail library
I have the latest version. Anyway, the solution came from Anatoly Kukuyuk.
The solution is to show the PDF export settings window: