Reputation: 590
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 request to run the report I could simply throw the data source resource 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?
Upvotes: 4
Views: 1195
Reputation: 1088
I may be wrong, without any much reading, I think you can create data source and domain via resource services.
To update the report file using the resource service, you may have to change the domainQuery node.
I had pulled out the jrxml for my json based report file and it looked something like this:
<resourceDescriptor name="domainQuery.xml" wsType="xml" uriString="/adhoc/topics/myjsonposts_files/domainQuery.xml" isNew="false">
Hope this will help you find your solution.
Upvotes: 1