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

Calling report in jasperserver from external java web application


kartheek017

Recommended Posts

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

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

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

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

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