You are not logged in.
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:
We will keep you informed in the pinned thread.
Kind regards,
Your ReportServer Team
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:
Wir halten euch im angepinnten Beitrag auf dem Laufenden!
Mit vielen Grüßen
Euer ReportServer Team
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/reportingdbI 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} = usernameThis 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
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