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-09-19 12:19:39

TZM
Member
Registered: 2016-08-23

Unable to link imported rpts to existing d-sources other than default

Hi,

I have two main datasources set up...ProdDB and RSDB. In the Jasper report that I use...ProdDB is the DB to pull my main report data from..

BUT I also use RSDB ..which is the db reportserver uses to function..ReportServer Data Source ..and is currently pointing to :

jdbc:postgresql://localhost:5432/reportingdb

I use RSDB to pull the name of the user currently logged in ..using a datasource parameter LoggedInUserName and a query:

select username from rs_user where $P{_RS_USER_USERNAME} = username

This info is displayed in the jasper report as $P{LoggedInUserName}

Now, when I try to import this report into another instance of RS..and select the default DB as ProdDB after selecting it as a datasource object..and NOT selecting RSDB because it already exists on the new instance..the report crashes because it cannot locate RSDB...However if I select RSDB in the import DB menu..a duplicate of RSDB is created. Is there any other method to do this right ? without the duplication bit..apart from physically configuring each report after every import..

Thanks,

TZM

Offline

#2 2016-09-20 07:04:17

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Unable to link imported rpts to existing d-sources other than default

Hi TZM,

I am afraid that this is currently not possible. You can set a default datasource which is then used for any datasource that is not imported but in your use case this is indeed insufficient and for the time being I think you are stuck with post-processing imported reports.

What I am not quite clear however is whether you need the second datasource in this case. Your datasource parameter LoggedInUserName has a constant expression (for the currently logged in user). So why don't you simply use $P{_RS_USER_USERNAME} within your report to display the user name? $P{_RS_USER_USERNAME} is passed to the execution engine and if you define a string parameter in your jasper report with name _RS_USER_USERNAME you should be able to use it.

Best Regards,
Arno

Offline

Board footer

Powered by FluxBB