Export to email without saving report

Hi,

Is there a way to send the report directly to email without the need to save a HTML file and if not is there a way to silently create the html file without a dialog popping up asking where to save the HTML file?

I’m currently using the follow code:

var exportConfiguration = new ExportConfiguration(LlExportTarget.Html, “test_report”, reportTemplatePath);

            exportConfiguration.ExportOptions.Clear();
            exportConfiguration.ExportOptions.Add(LlExportOption.ExportPath, "test_report.html");
            exportConfiguration.ExportOptions.Add(LlExportOption.ExportQuiet, "1");
            exportConfiguration.ExportOptions.Add(LlExportOption.ExportSendAsMail, "1");
            exportConfiguration.ExportOptions.Add(LlExportOption.ExportMailTo, recipient);
            exportConfiguration.ExportOptions.Add(LlExportOption.ExportMailSubject, "Reports");
            exportConfiguration.ExportOptions.Add(LlExportOption.ExportMailShowDialog, "0");
            exportConfiguration.ExportOptions.Add(LlExportOption.ExportMailSendResultAs, "text/html");

            exportConfiguration.ExportOptions.Add(LlExportOption.ExportMailProvider, "SMTP");

            exportConfiguration.ExportOptions.Add(LlExportOption.ExportMailSmtpServerAddress, _smptHost);
            exportConfiguration.ExportOptions.Add(LlExportOption.ExportMailSmtpServerPort, _smtpPort);
            exportConfiguration.ExportOptions.Add(LlExportOption.ExportMailSecureConnection, "true");
            exportConfiguration.ExportOptions.Add(LlExportOption.ExportMailSmtpServerUser, _smtpUsername);
            exportConfiguration.ExportOptions.Add(LlExportOption.ExportMailSmtpServerPassword, _smtpPassword);

            _reportListLabel.Export(exportConfiguration);

Hi Robin,

thank you for your post.

Unfortunately it is not possible to send the HTML export result via email without saving it into the file system before.

Yes, it is possible to realize an export without user interaction:

[code]ListLabel LL = new ListLabel();
LL.DataSource = CreateDataSet();

// Set target and path (here: PDF) and project file
ExportConfiguration expConfig = new ExportConfiguration(LlExportTarget.Pdf,
“”, “”);

// Show result
expConfig.ShowResult = false;

// Start export
LL.Export(expConfig);
LL.Dispose(); [/code]

Please have a look into the programmer’s manual for more detailled information. You will find a description in chapter “2.5.9 Export > Export Without User Interaction”.

Best regards,

Christian Rauchfuß
Technical Support
combit GmbH