mohanas20 Posted October 22, 2013 Share Posted October 22, 2013 i have tried for developing jasper report generation in PDF using struts2,in a JDeveloper,i'm gettigng below error:" java.lang.NoSuchMethodException: groovy.runtime.metaclass.java.util.HashMapMetaClass.<init>(groovy.lang.MetaClass)" compiler is unable to run the JasperPrint file and jasper classess ,i have added all the jar file which is required.but still getting proble. please kidly help,my production was stopped due to this error. Link to comment Share on other sites More sharing options...
Java_Jasper Posted October 22, 2013 Share Posted October 22, 2013 Hello,Review this post and let me know if it helps; http://community.jaspersoft.com/questions/542548/problems-displaying-pdfAs for the Libs you will need the following jars:PoiXml-apis-extXml-apisITextCommmons-loggingCommons-JavaflowCommons-digesterCommon-CollectionsCommons-beanutilsB. Link to comment Share on other sites More sharing options...
mohanas20 Posted October 23, 2013 Author Share Posted October 23, 2013 java.lang.NoSuchMethodException: groovy.runtime.metaclass.java.util.HashMapMetaClass.(groovy.lang.MetaClass) please please suggest me...i have followed the same way but i am unable toresolve the issue Link to comment Share on other sites More sharing options...
Java_Jasper Posted October 24, 2013 Share Posted October 24, 2013 Hello, It sounds like you have a hash map issue, make sure you are verifying in the debugger that your hash map is in fact being made. 1. Make sure you a creating a map: Map parameter = new HashMap(); 2. Make sure you are passing said map into the fill manager: JasperPrint print = JasperFillManager.fillReport(REPORT_NAME, parameter, DATABASE_CONNECTION); Link to comment Share on other sites More sharing options...
mohanas20 Posted October 28, 2013 Author Share Posted October 28, 2013 i have two problems 1.can i map more than one parameter in a single pdf file 2.can I have multiple pages in a single pdf report,how can I set the page_number from java struts2. and thanks for helping till now Link to comment Share on other sites More sharing options...
Java_Jasper Posted October 30, 2013 Share Posted October 30, 2013 Hello, 1. Yes you can map multiple parameters to said PDF. Use the following: parameter.put(“parameter_name_declared_in_template”, URL_String_Name) Example: pramater.put(“Logo”, image); 2. Setting the page number is done in iReprot you will find this in the components pallet, also see the “Jasper Ultimate Guide” for more info on subject. 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