You are not logged in.
I am able to send reports via email to one or more recipients by adding users to the "Recipients" section, but what I need to do is actually to have some of the recipients as CC-ed. Is this possible and if so how would it be done?
Thank you!
Offline
Hi Johann,
you can write your own custom "SendTo"-Scripts if you need functionality not available in ReportServer. Pls. take a look here: https://reportserver.net/en/guides/scri … s/Send-To/
Regards,
Eduardo
Offline
Thanks Eduardo. Will this solution actually change the GUI of the report scheduling?
Offline
Hi Johann,
yes, you will get a new entry in "send to..." menu, and also a new entry for scheduling if supportsScheduling = true, refer to https://reportserver.net/en/guides/scri … s/Send-To/
12.1.3. Scheduling
Regards,
Eduardo
Offline
Hi Eduardo,
Not sure if I am missing something, but where should the code snippets be placed and do we run them like a typical groovy file (i.e. `exec script.groovy`)?
Additionally, how would we undo the changes and rollback to the original state of the SendTo configuration?
Last edited by Johann (2022-06-10 06:29:03)
Offline
A couple of clarifications I would like to make as well:
1. I noticed that in the full example (https://reportserver.net/en/guides/scri … s/Send-To/) 12.1.4 line 12
reportService = GLOBALS.getInstance(ReportService.class)
the `reportService` variable does not seem to be used in the script. May I check what it's purpose is supposed to be?
2. The documentation states that "The getId method is used to define a unique identifier to identify the send to target."
How do we obtain this unique identifier? I am not sure what value to use in the example given.
Thank you!
Offline
Hi Johann,
1. yes, this is correct. You can remove this service if you don't need it.
2. this is a unique id you have to set, so this id cannot be used in another hooks. You can use any string that is not used in other hooks. You don't have to obtain it, you just set it and make sure it is not used anywhere else in your hooks.
Regards,
Eduardo
Offline
Hi Eduardo,
I see, thank you!
Offline
Hi Johann,
we updated the documentation and added the example script here: https://github.com/infofabrik/reportser … ail.groovy
Regards,
Eduardo
Offline