ceriise Posted September 25, 2007 Share Posted September 25, 2007 hi,I am using a struts application and I would like to use jasperreport to generate some pdf files. Does anybody know how to use jasperreports in struts? Thank you for your helpFazo Link to comment Share on other sites More sharing options...
codyjasperForge Posted September 25, 2007 Share Posted September 25, 2007 I am doing something very similar. If you have downloaded JasperServer, run the "ant" build of the java-web-app example, deploy it and make the necessary changes. The functionality is very similar in struts. I am looking for implementation of the WSClient code, to use in my app, please reply if you find anything relevant to this. Link to comment Share on other sites More sharing options...
ceriise Posted September 25, 2007 Author Share Posted September 25, 2007 when you say make the necessary changes? what do you mean by that? You know it's been quite a longtime I am working on that, and I don't want to search something else unless I am sure it's benefic :)What did you write in your action? Link to comment Share on other sites More sharing options...
codyjasperForge Posted October 6, 2007 Share Posted October 6, 2007 I made changes to each of the jsp's that were included to integrate with my ActionForm's. Then I wrote my Action classes to do whatever processing needed to be done. (This is usually the way that struts is used in a web app) If you have anymore questions I'll try my best to answer. Good luck. Code:JSP -> ACTIONFORM -> ACTION -> FORWARD -> NEWJSP ;) Link to comment Share on other sites More sharing options...
ceriise Posted October 14, 2007 Author Share Posted October 14, 2007 hello,I found how! What about you? Do you still need help? Link to comment Share on other sites More sharing options...
codyjasperForge Posted October 15, 2007 Share Posted October 15, 2007 Hello ceriise, Actually I have solved my previous issue, but I do have a new problem that I could use some help on. My requirement is to generate a report "asynchronously". The user should have the ability to navigate throughout the application while the report is being generated. I have seen similar functionality in the JasperServer download source, but I am unsure as to how to implement this using Ajax/Struts. As of now I am able to submit an asynchronous request to my Action. Now I just need to know how to execute the report from my Action class asynchronously. Everywhere I have searched, I have found that ppl are using threads/queues to do this, but it isn't explicit on exactly how this is integrated into Struts. Please help... :unsure: Link to comment Share on other sites More sharing options...
ceriise Posted October 16, 2007 Author Share Posted October 16, 2007 hello,what's the action that lounches your report? I have a problem too B) Here is the issue: the button that generates the report works only once!!! My requirement is to let the user customize its report: choose the columns to be printed, the size of the columns, the printing (landscape or normal), the format ....So this very nice button that does this works only once, meaning if for example I want to change something in my report and launche it again to generate a new report, it does not work and gives an error page.Do you have an idea about that? Link to comment Share on other sites More sharing options...
codyjasperForge Posted October 17, 2007 Share Posted October 17, 2007 It sounds like you may need to debug your request. So run your app in debug, and set a breakpoint as soon as you enter the Action class. Look at your request's attribute, and parameter values, make sure that the request has the right details to run the report more than once... Remember, that once a request has been submitted and responded to, it is no longer active, meaning that all of its values are GONE. Try starting there and see what you can determine. Thats my suggestion. :huh: Link to comment Share on other sites More sharing options...
ceriise Posted October 18, 2007 Author Share Posted October 18, 2007 hey!I found it, Actually i had to add a boolean to the viewer and it worked but thanks anyways :) 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