Jump to content
Changes to the Jaspersoft community edition download ×

Run report with different data set via REST API


joshua.turner
Go to solution Solved by elizam,

Recommended Posts

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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

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-definitions

I 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...