I’m trying to send a dashboard as a report in an email from automation script.
Based on these two DOJO posts:
…it seems this should be possible using the MailReportOptions class, by setting the ReportName to the dashboard name, including all parent folders separated by /.
My dashboard file path on the DMA is:
"C:\Skyline DataMiner\dashboards\Customer\Alarm Reports\Error reports\Errors per Device Class - E2309.dmadb.json"
In my Automation script, I tried the following approaches:
MailReportOptions reportOptions = new MailReportOptions();
reportOptions.ReportName = "Customer/Alarm Reports/Error reports/Errors per Device Class - E2309";
reportOptions.SetMailOptions(emailOptions);
engine.SendEmail(emailOptions);
and second option:
MailReportOptions reportOptions = engine.PrepareMailReport("Customer/Alarm Reports/Error reports/Errors per Device Class - E2309");
reportOptions.SetMailOptions(emailOptions);
engine.SendEmail(emailOptions);
Neither option seems to work. Email is sent without report.
I also tried providing the full file path, but that didn’t work either.
reportOptions.ReportName = $"C:/Skyline DataMiner/dashboards/Customer/Alarm Reports/Error reports/Errors per Device Class - E2309";
Question:
Is it actually possible to send a dashboard as a report via email from an Automation script?
If so, what is the correct way to reference the dashboard in MailReportOptions.ReportName?

Hi Dario,
This snippet shows the simplest way to email a report that includes a dashboard PDF:
var mailReportOptions = new MailReportOptions();
mailReportOptions.ReportName = "MyFolder/MyDashboard";
mailReportOptions.SetMailOptions(new EmailOptions()
{
TO = "name.lastname@domain.com",
});
engine.SendReport(mailReportOptions);
PDF generation has recently been improved, including support for private dashboards. I recommend upgrading to version 10.5.11 or later for the best results.
I also tried this approach, but it throws exception:
MailReportOptions reportOptions = engine.PrepareMailReport("Customer/Alarm Reports/Error reports/Errors per Device Class – E2309");
reportOptions.SetMailOptions(emailOptions);
engine.SendReport(reportOptions);
Exception:
2025/10/20 15:45:12.328|SLAutomation.exe 10.5.2534.1192|12484|11932|CActionHandler::SendMailReport|DBG|-1|(Script SendEmailMamErrorsReport) Failed to send report: 0x80131500h
2025/10/20 15:45:12.329|SLAutomation.exe 10.5.2534.1192|12484|11932|CScriptLoader::ExitNow|DBG|-1|[Administrator] (Script SendEmailMamErrorsReport) EXIT: "Run|Something went wrong: (Code: 0x80131500) Skyline.DataMiner.Net.Exceptions.DataMinerException: Report Failed: 0x80004005
at Skyline.DataMiner.Automation.Engine.SendReport(MailReportOptions options)
at SendEmailMamErrorsReport.Script.RunSafe(IEngine engine)
at SendEmailMamErrorsReport.Script.Run(IEngine engine)"