Request Description
User has a requirement to retrieve TIBCO JasperReports® Server URL when running a report to find out on which instance the report is running.
How to achieve it?
Solution
A possible way to retrieve TIBCO JasperReports® Server URL where a report is running is to use an expression
((javax.servlet.http.HttpServletRequest)$P{REPORT_PARAMETERS_MAP}.get("HTTP_SERVLET_REQUEST")).getRequestURL()
The expression returns a value like
http://<servername>:<port_number>/jasperserver-pro/flow.html
You may process / truncate the string value per your requirements.
Please note, the expression only works when running the report via TIBCO JasperReports® Server UI.
It does not work if you run the report in TIBCO Jaspersoft Studio.
Solution tested with TIBCO JasperReports® Server v.7.2, v.7.5.
AS-20200617, case 01862140
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now