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

Integration of reports with web application


skolluri

Recommended Posts

Hi,

I have reports running on JasperServer. We created the JRXML files on iReport, and loaded them on JasperServer. Everything works perfect. Now, we have a web application, from which we want to call the reports - a link for a report or something like that.

How I can integrate the jasperserver web application with this external web application. For example , have a link from the homepage of the web application to a report running on JasperServer? I have read about how you can call JasperReports from web applications, but that would mean creating a new JRXML with things configured differently etc.

Since we already invested time in setting up the JasperServer, and the reports on it, is it at all possible to integrate that to the web application directly?

Would appreciate if someone can give me answers on this soon.

Thanks,

Sridevi

 

 

 

Link to comment
Share on other sites

  • Replies 13
  • Created
  • Last Reply

Top Posters In This Topic

Thanks for your reponse, Ram!

So,Looks like web services is the only way i can run the Jasperserver report. I read in one of the posts about calling a URL to the report from a web application. I didnt know how that was done. But i guess it is calling a web service in the background.

I would have to use Acegi-security if i want single signon from the web app to Jasperserver. Right?

 

Thanks,

Sridevi

Link to comment
Share on other sites

You can use JasperServer URLs that show the result of a report execution.  It doesn't work via web services, it's just a HTTP call served by the JS web application.

If you want to seamlessly integrate JS with your application, you would need a single sign on implementation so that JS doens't require explicit authentication.

Regards,

Lucian

Link to comment
Share on other sites

Lucian,

 

Thanks for the reply! Calling a URL to get the report output is cool.

Would this work even if the report in JasperServer uses user-driven parameters? Currently, we have Input Controls in JS, that are used in the report to control the output. If I call a URL to show the output of a report, would it be enough if I pass the parameters as request parameters?

Well, this question exists even if we use WebServices to call the reports, I think.

 

Thanks,
Sridevi

Link to comment
Share on other sites

skolluri
Wrote:

If I call a URL to show the output of a report, would it be enough if I pass the parameters as request parameters?

Well, this question exists even if we use WebServices to call the reports, I think.

Input control values can be send as URL parameters.  See the JS user guide for details.

With web services, input control values are part of the SOAP request.  See the JS web services guide.

Regards,

Lucian

Link to comment
Share on other sites

We successfully use the following URL from our parent/calling web app:

 

http://localhost/jasperserver/flow.html?_flowId=viewReportFlow&reportUnit=/reports/ourReport&standAlone=true&Year=2008&ParentFolderUri=/reports&j_acegi_security_check?&j_username=jasperadmin&j_password=jasperadmin

 

where </reports/ourReport> is the path of the report in the repository, <Year> is an input control, and <j_username> and <j_password> is the credential info.

 

Hope this helps,

 

Tony

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I used Tony's suggestion to use the URL. It worked fine except that it opened the report in JasperServer UI again (not as a PDF that I had given as the output parameter value), and with the Input Control box open (with the parameters I gave in the URL selected). So, I have to click "enter" for it to open up the report. Even then, it opened it up in JasperServer, not as a PDF.

 

Is this the expected behavior when you use direct URLs to access reports on JasperServer? I have to call the reports from another web application. I want to just give the URL, so it opens up the report in the format.

 

Is there a way to achieve that?

Anyone, please help?

 

Thanks,

Sridevi

Link to comment
Share on other sites

skolluri
Wrote:

I used Tony's suggestion to use the URL. It worked fine except that it opened the report in JasperServer UI again (not as a PDF that I had given as the output parameter value), and with the Input Control box open (with the parameters I gave in the URL selected). So, I have to click "enter" for it to open up the report. Even then, it opened it up in JasperServer, not as a PDF.

Do you have "Always Prompt" checked for the report?  If so, unset it.

If you want PDF output, add &output=pdf to the URL.

Regards,

Lucian

Link to comment
Share on other sites

  • 3 years later...

 Hello Sridevi,

 

If you pass the credentials as parameters then its exposed to end user. If you look at source code of the page I guess crdentials are exposed there.

Instead of this I was looking for a solution where in custom SSO filter can be written & used which would auto show me the report  after user is authenticated instead of login page.

 

Thanks

Bhargav.

Link to comment
Share on other sites

  • 1 year later...

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