skolluri Posted April 23, 2009 Share Posted April 23, 2009 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 More sharing options...
rkm258 Posted April 23, 2009 Share Posted April 23, 2009 hi, As far as i know u can do it, by1. web services2. have a custom authentication filter (acegi security) defined to authenticate your web app users into jasper server, and then have ur link to reports to execute them. Ram Link to comment Share on other sites More sharing options...
skolluri Posted April 23, 2009 Author Share Posted April 23, 2009 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 More sharing options...
lucianc Posted April 24, 2009 Share Posted April 24, 2009 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 More sharing options...
skolluri Posted April 24, 2009 Author Share Posted April 24, 2009 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 More sharing options...
lucianc Posted April 27, 2009 Share Posted April 27, 2009 skolluriWrote: 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 More sharing options...
skolluri Posted April 27, 2009 Author Share Posted April 27, 2009 Lucian,Thanks for your reply. I found the JS User's Guide. I will look through it and find the answer. Thanks!Sridevi Link to comment Share on other sites More sharing options...
admayoral92121 Posted April 30, 2009 Share Posted April 30, 2009 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 More sharing options...
skolluri Posted April 30, 2009 Author Share Posted April 30, 2009 Thanks, Tony!Thats just what I need to do in my application too. I was working on soemthing else, and havent gotten to the URL part yet. But this info should be very useful when I start that again! Thanks,Sridevi Link to comment Share on other sites More sharing options...
skolluri Posted May 22, 2009 Author Share Posted May 22, 2009 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 More sharing options...
lucianc Posted May 27, 2009 Share Posted May 27, 2009 skolluriWrote: 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 More sharing options...
skolluri Posted June 2, 2009 Author Share Posted June 2, 2009 Lucian, Thanks for your reply! The "Always Prompt" was indeed checked for the report. I unchecked it, and it goes to the PDF directly when you call the report using the direct URL. Thanks! Sridevi Link to comment Share on other sites More sharing options...
lokinindi18 Posted June 28, 2012 Share Posted June 28, 2012 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. ThanksBhargav. Link to comment Share on other sites More sharing options...
grajan777 Posted December 29, 2013 Share Posted December 29, 2013 Hi Sridevi, I am new to jasperreports. Can you kindly help me to do the two things in jasper reports? 1. To pass a parameter as part of the URL. 2. To pass another parameter to generate report in PDF/EXCEL etc. Thanks George. 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