#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

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

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