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

Need a sample example for generating jasper report from Java struts2,in jdeveloper


mohanas20

Recommended Posts

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

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

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

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

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