Skip to content
DataMiner Dojo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Learn more about Agile
        • Agile Webspace
        • Everything Agile
          • The Agile Manifesto
          • Best Practices
          • Retro Recipes
        • Methodologies
          • The Scrum Framework
          • Kanban
          • Extreme Programming
        • Roles
          • The Product Owner
          • The Agile Coach
          • The Quality & UX Coach (QX)
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Program
    • DataMiner DevOps Support
    • Feature Suggestions
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

Is it possible to send a dashboard as a report via email from an Automation script?

Solved121 views1 day agoAutomation script email MailReportOptions Reports and Dashboards
2
Dario Sarkanovic [SLC] [DevOps Advocate]951 2 days ago 1 Comment

I’m trying to send a dashboard as a report in an email from automation script.

Based on these two DOJO posts:

https://community.dataminer.services/question/sending-a-report-via-email-using-c/?hilite=send+dashboard+email

https://community.dataminer.services/question/how-to-send-a-by-code-created-dashboard-as-a-report-via-email/

…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?

Dario Sarkanovic [SLC] [DevOps Advocate] Selected answer as best 1 day ago
Dario Sarkanovic [SLC] [DevOps Advocate] commented 2 days ago

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)"

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Sebastiaan Dumoulein [SLC] [DevOps Enabler]13.22K Posted 1 day ago 0 Comments

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.

Dario Sarkanovic [SLC] [DevOps Advocate] Selected answer as best 1 day ago
You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin