I'm looking to generate a dashboard report from automation. Can someone share an example in C# code to do this?
PS:
As a workaround, we make a scheduled task in the scheduler that generates a dashboard report. Then we trigger the execute now in order to generate the report and send it through mail.
Hi Michiel, to send a report by mail using a C# automation script you could use the PrepareMailReport and SendReport methods.
Alternatively you could also use the Email action in an automation script to send the report without using code.
![](https://community.dataminer.services/wp-content/uploads/wp-user-manager-uploads/2020/10/cookie_monster_by_neorame_d4yb0b5-pre-1.jpg)
![](https://community.dataminer.services/wp-content/uploads/wp-user-manager-uploads/2022/03/97225679.jpg)
Link has been fixed.
![](https://community.dataminer.services/wp-content/uploads/wp-user-manager-uploads/2020/10/cookie_monster_by_neorame_d4yb0b5-pre-1.jpg)
I was able to generate the report with PrepareMailReport. However, I did not find how the options can be changed (e.g. stack components, size, …). Any idea how this could be done?
I was able to add another section after the C# code to send the report with the desired options.
Hi Tom, could you update/fix the link to the PrepareMailReport?