Jump to content
We've recently updated our Privacy Statement, available here ×

Using REST to run a report with data source specified at run time


dpmmodal

Recommended Posts

I have no problem executing a report on JasperServer using the RESTful api when the report unit has data source predefined.

What need to do though is allow my customers to select what database they want to run the report against when they are getting ready to execute a report. I assumed that when I make the PUT call to run the report I could simply throw  the data  sourceresource descriptor in the ReportUnit resource descriptor passed in the PUT but it doesn't seem to work.

I even went as far as to pull the resource descritor for the ReportUnit when it had the data  source predfined. Tested that passing that resource descritor in the PUT worked. Then removed the predifiend data  source  and tried executing the report again using the exact resource descriptor I pulled previously and it would not work.

Is this possible? 

 

 



Post Edited by dpmmodal at 03/09/2012 16:34
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks for your reply, I actually just figured that out.

My plan now is to create  the report units on the fly as clients make the execute report requests and reuse them once they have been created for subsequent requests for the same report/database combination.

Link to comment
Share on other sites

  • 10 months later...

Hi. Could you please post your code as an example of modifying the resource with the jasperserver REST API? I am struggling when try to do this. The POST method to modify the resource keeps returning to me an "premature end of file" error when i try to make changes in the resource descriptor.

It's been a long time trying a lot of ways to figure this out but i'm getting no answers. I am using JasperServer 4.7.0.

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