markwilliamson101 Posted March 6, 2017 Share Posted March 6, 2017 Hi,Just wondering can one switch or choose the JDBC datasource a report uses to generate data based on query params? I have a use case where one single report template is requried, but coud point at several datasources. I would like to be able to do the report without having to make several copies of the same template hardcoded to use a speciific data source. Best,Mark Link to comment Share on other sites More sharing options...
Solution elizam Posted March 6, 2017 Solution Share Posted March 6, 2017 If this is in the server, you might be able to use attributes:http://community.jaspersoft.com/documentation/tibco-jasperreports-server-administrator-guide/v630/managing-attributesHowever, you can't use report parameters in the query, because the datasource is loaded before parameters. Link to comment Share on other sites More sharing options...
hozawa Posted March 6, 2017 Share Posted March 6, 2017 If you are programming, you can just dynamically set the datasource to pass to the report. That's what I do. 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