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 2019-05-29 06:54:33

auchentoshan
Member
Registered: 2019-05-29

Passing values to Email Body

I am very new to ReportServer, I am wondering is there a option to pass values from datasource to Email Body sent via Scheduler?

Offline

#2 2019-06-03 06:14:42

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Passing values to Email Body

Hi auchentoshan,

what values are you talking exactly about? Could you please elaborate?

Regards,
Eduardo

Offline

#3 2019-06-19 04:51:49

auchentoshan
Member
Registered: 2019-05-29

Re: Passing values to Email Body

For example binding sql results to a variable that can be use in the message body of the mail sent by scheduler, results like counts of records from a specific query.

eduardo wrote:

Hi auchentoshan,

what values are you talking exactly about? Could you please elaborate?

Regards,
Eduardo

Offline

#4 2019-06-20 16:48:26

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Passing values to Email Body

Hi auchentoshan,

the available substitutions that can be used are these: https://reportserver.net/en/guides/conf … Scheduler/ (4.3.3.: available substitutions).

If you need other data, you can create your own "Send to" script, which can also be scheduled. There, you can include any information you need, as you can see in this example:
https://reportserver.net/en/guides/scri … s/Send-To/

Count of records could be implemented by executing a given report and exporting it to a RS_TABLE or RS_DATACOUNT format.

Then, use the net.datenwerke.rs.base.service.reportengines.table.output.object.CompiledTableReport or net.datenwerke.rs.base.service.reportengines.table.output.object.CompiledDataCountTableReport for counting the records and including it into the email body:

def myExportedTable = reportExec.execute(report, "RS_DATACOUNT", execConfig)
def dataCount = myExportedTable.getDataCount()

Regards,
Eduardo

Offline

#5 2019-06-27 13:59:37

auchentoshan
Member
Registered: 2019-05-29

Re: Passing values to Email Body

Dear Eduardo,

Thanks for the explanation, I will give it a try.



eduardo wrote:

Hi auchentoshan,

the available substitutions that can be used are these: https://reportserver.net/en/guides/conf … Scheduler/ (4.3.3.: available substitutions).

If you need other data, you can create your own "Send to" script, which can also be scheduled. There, you can include any information you need, as you can see in this example:
https://reportserver.net/en/guides/scri … s/Send-To/

Count of records could be implemented by executing a given report and exporting it to a RS_TABLE or RS_DATACOUNT format.

Then, use the net.datenwerke.rs.base.service.reportengines.table.output.object.CompiledTableReport or net.datenwerke.rs.base.service.reportengines.table.output.object.CompiledDataCountTableReport for counting the records and including it into the email body:

def myExportedTable = reportExec.execute(report, "RS_DATACOUNT", execConfig)
def dataCount = myExportedTable.getDataCount()

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB