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 2016-12-06 18:57:45

bpeikes
Member
Registered: 2016-10-29

Techniques for switching datasources

Let's say you have 3 datasources, each pointing to a different instance of your databases. For instance, dev, staging, production. Is there anyway to have a report where the datasource can be chosen at run time?

Offline

#2 2016-12-06 22:52:02

karolina
Member
Registered: 2014-08-09

Re: Techniques for switching datasources

Yes, for this you can use a database bundle (it is available in the RS Enterprise Edition)

You'll find some introduction here

To assign the datasource when running a report, choose Parameter as the key provider and add a key of the parameter (for example: dataSource) you'll later use to choose the data source.

With only 3 datasources, the static mapping should be sufficient for you. Here you manually set a key for each datasource in the bundle (for example: dev, stage, prod) and you manually choose the datasources from the list of available datasources.

In the report you specify the bundle as the report's data source. As the parameter that determines the assigned datasource you may use a datasource parameter. The key of the parameter should be the same as specified at the bundle configuration (here: dataSource).

The datasource of the parameter can be a CSV data source. (Whether to choose the text connector or the argument connector depends where you want to define the list of values, respectively: at the datasource config or at the datasource parameter config. I prefer the text connector, as it allows to reuse the CSV datasource in many reports). The first column in the CSV datasource should contain the keys of the datasources you defined in the static mapping (here: dev, stage, prod). The second column should contain a display value (a more descriptive, user-friendly label, like: Development, Staging, Production)

Hope it helps. If anything is unclear, let me know.

Karolina

Last edited by karolina (2016-12-06 22:53:37)

Offline

Board footer

Powered by FluxBB