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-10-11 05:21:26

julian.hh
Member
Registered: 2019-10-11

Dynamic Email List / Personalised Report

Hi all,

I am looking for a software that could handle one of our requirements for the company: Dynamic Emails and Personalisation.

Basically what we want to achieve is that from utilizing one single report template, e.g. a sales summary report, the software will allow us to personalise it to the users so that they will only receive content relevant to them specifically.

Could ReportServer cater for this requirements and would there be a lot of effort involved?

Thanks.

Offline

#2 2019-10-14 13:16:32

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Dynamic Email List / Personalised Report

Hi julian.hh,

what you describe is easily achievable with user variables, please check here:
"By applying user variables, the same report holds a different base data entirety for different users."

https://reportserver.net/en/guides/admi … Variables/

Regards,
Eduardo

Offline

#3 2019-10-30 02:02:35

julian.hh
Member
Registered: 2019-10-11

Re: Dynamic Email List / Personalised Report

Hi Eduardo,

Can the user variables be dynamically generated? I've played with the software for a few days, and only noticed that you could only pre-define the variables before the report sends out. What we want to achieve is to "scan" which salesperson has data within this report, then the software will dynamically send the report to them.

Thanks.

Offline

#4 2019-11-01 08:51:27

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Dynamic Email List / Personalised Report

Hi julian.hh,

you can create a script report for this purpose. In this script, you can execute the "real" report and scan the results. Depending on the results, you can send the report to the people you need. More information on script reports here: https://reportserver.net/en/guides/scri … Reporting/

This is a code snippet (just to give you an idea of how to achieve this):

 def report = reportService.getReportById 1234 // the id of the real report
 def parameterSet = report.parameterInstances
 parameterSet.each{ param -> // only necessary if you want to set a parameter in the report
    def parameterName = param.definition.name
    if ("P_CLIENTID" == parameterName)
        param.value = 5678
 }

// here you execute the real report
def tableModel = reportExec.execute report, "RS_TABLE", ReportExecutionConfig.EMPTY_CONFIG
// you fetch the table definition for being able to scan the results
def tableDefinition = tableModel.tableDefinition
def indexMyColumn = tableDefinition.originalColumnNames.indexOf "my_column" // you search for the index of my_column

def allData = tableModel.data
def data = allData[0] //here you only scan the first record. For all records, just make it a loop
def myColumnContent = data.row[indexMyColumn]
// now you can do whatever you need with the content of myColumnContent

Instead of scanning the table, though, it would be maybe better to write an sql statement that for each person returns a "1" or "0", depending if the report should be sent to them or not. Then, in the script report, just send the report to the people you have "1" as a result. In this way, the report and the condition would be separated, which may be a better design, since the condition and the report are independent of each other.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB