kartheek017 Posted January 22, 2014 Share Posted January 22, 2014 Hi, I need help in calling a report in jasperserver from external java web application.i had tried to call the report by using http call for that i am passing the jasperserver location,report name which i need and alogn with jasperserver username and password as "http://10.10.19.196:8080/jasperserver-pro/flow.html?_flowId=homeFlow&j_username=superuser&j_password=superuser" the problem for me here is when iam passing parameters to report through url its working fine until i click on reset on button, once i clicked reset button the parameters which am passing they also deleted. Is there any alternate way to pass parameters to jasper report. or Is there any alternate way to call report in jasperserver. As i am new to this functionality please help me with an example .... karthik Link to comment Share on other sites More sharing options...
rmiller Posted January 23, 2014 Share Posted January 23, 2014 You can use the REST API to display a report. This page will help you get started, http://community.jaspersoft.com/wiki/jaspersoft-web-services-reference. Also, download the Web Services Guide from the Docs tab. Link to comment Share on other sites More sharing options...
kartheek017 Posted January 23, 2014 Author Share Posted January 23, 2014 Thanks for reply as i am new to webservices am not able to understand the process can u explain in detail with an example so i can easily understand Link to comment Share on other sites More sharing options...
rmiller Posted January 23, 2014 Share Posted January 23, 2014 Thinking about your comment above where you say that when you lose the parameters when you click the refresh (reset) button, it makes sense because the server knows nothing about the parmeters sent in the URL and when you click on reset it just uses the default parameters. You will have to override the refresh button in your application to send the parameters again. You can remove the refresh button from the tool bar by editing /WEB-INF/jsp/modules/viewReport/ViewReport.jsp and comment out the following line: <ul class="list buttonSet"> <!-- <li class="leaf"><button id="dataRefreshButton" type="submit" title="<spring:message code="jasper.report.view.button.data.refresh" javaScriptEscape="true"/>" class="button capsule up"><span class="wrap"><span class="icon"></span></span></button></li> --> </ul> Link to comment Share on other sites More sharing options...
rmiller Posted January 24, 2014 Share Posted January 24, 2014 Using the HTTP API to display reports is much easier that using REST, so you may want to go that route. Having said that, there is sample code at the bottom of the "Getting Started with the REST Web Service API" page. You'll have to download and install Maven to run it but otherwise it's pretty straight forward. You can also find sample client code in the samples folder in the distribution. 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