joshua.turner Posted November 28, 2018 Share Posted November 28, 2018 We have a basic report that we want to target against different data sets (basically different mongo databases) via rest API, but we are getting just generic error message so I am wondering what we are doing wrong incorrectly.The request being made is - "http://localhost:8081/jasperserver/rest_v2/reports/reports/CustomersReport.pdf?REPORT_DATA_SOURCE=%2fdatasources%2fTestDb". The data source TestDb and report CustomersReport both do exist in the jasperserver UI. If I go to edit the report data source in the UI to the /datasources/TestDb the report runs successfully - providing the parameter REPORT_DATA_SOURCE seems to break it. Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Solution elizam Posted November 28, 2018 Solution Share Posted November 28, 2018 If you're running them as different users, or from different servers, or from different organizations, you can use a data source defined with an attribute:https://community.jaspersoft.com/documentation/tibco-jasperreports-server-administrator-guide/v71/attributes-data-source-definitionsI don't know if there's any way to just pass an attribute using REST, with the same user/org/server setup. 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