Announcement

Migration of this forum

Dear users of this forum,

we are pleased to inform you that we will be updating the software behind this forum in the near future.

Existing posts, users and categories will remain untouched.

Important:

  • Each user will need to reset their password.
  • Please select "I forgot my password".
  • Enter the email address you used to register in this forum.
  • You will receive an email with a link to set a new password.
  • Please choose a new (secure) password and confirm the process.

We will keep you informed in the pinned thread.

Kind regards,
Your ReportServer Team


Migration des Forums

Liebe Nutzer dieses Forums,

wir freuen uns, euch mitteilen zu können, dass wir in naher Zukunft die Software hinter diesem Forum aktualisieren werden.

Existierende Beiträge, Nutzer und Kategorien bleiben weiterhin bestehen!

Wichtig:

  • Jeder Nutzer muss sein Passwort neu vergeben.
  • Wählt dazu einfach "Ich habe mein Passwort vergessen".
  • Gebt die E-Mail-Adresse ein, mit der ihr registriert seid.
  • Ihr erhaltet eine E-Mail mit einem Link zur Passwortvergabe.
  • Bitte wählt ein neues (sicheres) Passwort und bestätigt den Vorgang.

Wir halten euch im angepinnten Beitrag auf dem Laufenden!

Mit vielen Grüßen
Euer ReportServer Team

#1 2022-06-02 03:09:52

Johann
Member
Registered: 2022-05-30

Sending Reports via Email - How to CC recipients

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

#2 2022-06-07 08:44:25

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Sending Reports via Email - How to CC recipients

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

#3 2022-06-08 01:27:53

Johann
Member
Registered: 2022-05-30

Re: Sending Reports via Email - How to CC recipients

Thanks Eduardo. Will this solution actually change the GUI of the report scheduling?

Offline

#4 2022-06-08 08:53:36

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Sending Reports via Email - How to CC recipients

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

#5 2022-06-10 05:46:09

Johann
Member
Registered: 2022-05-30

Re: Sending Reports via Email - How to CC recipients

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

#6 2022-06-10 06:43:56

Johann
Member
Registered: 2022-05-30

Re: Sending Reports via Email - How to CC recipients

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

#7 2022-06-10 08:21:31

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Sending Reports via Email - How to CC recipients

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

#8 2022-06-10 15:21:35

Johann
Member
Registered: 2022-05-30

Re: Sending Reports via Email - How to CC recipients

Hi Eduardo,

I see, thank you!

Offline

#9 2022-07-20 11:38:00

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Sending Reports via Email - How to CC recipients

Hi Johann,

we updated the documentation and added the example script here: https://github.com/infofabrik/reportser … ail.groovy

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB