jgraham0325 Posted December 13, 2013 Share Posted December 13, 2013 Hi,I'm trying to create a hyperlink that takes me to a different link depending on which server my report is running on and was wondering if someone could help.The scenario:We have a development server and a live server.I want a link in the report to go to a corresponding link in the development environment if that's where the report is running.If the report is running in the live environment then I want the link to go somewhere else.The link is not another jaspersoft report, it's a spring web application, so I can't use the report execution hyperlink option.I don't want to have to make any changes to the report between the 2 environments, just a straight export.Both enviroments use different databases so I've tried doing it this way:$P{REPORT_CONNECTION}.getMetaData().getURL().contains("live-db") ? "http://livelink.com" : "http://devlink.com"[/code] This approach works for my browser but doesn't seem to work for another persons browser (always taking them to the dev link). I haven't fully investigated why.Does anyone know of a better way to do achieve this? Setup:Jasperserver Pro 4.7iReport 4.7 Thanks,James Link to comment Share on other sites More sharing options...
jgraham0325 Posted February 12, 2014 Author Share Posted February 12, 2014 Just an update on this. Using the above method works fine, until the user tries to use the filters in the table component. As soon as a filter is used, the REPORT_CONNECTION object becomes null.If anyone has any other ideas, please let me know. Thanks,James Link to comment Share on other sites More sharing options...
Recommended Posts
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