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

Help with iReport scriptlet


mrkkid

Recommended Posts

 I have a web app deployed to Apache linked to Tomcat7 with mod_jk. I've developed a report in iReport (using an XML data source) that requires totals of certain fields on the Summary band based on the value in other fields (ie count the number of salaried employees paid based upon the field "pay_type"). I wrote a scriptlet to handle this.

The report WORKS in iReport previewer with proper totals. Upon deploying to Tomcat, the totals double (only the conditional totals accumulated in the scriptlet - the totals accumulated through normal report variables with calculation type "sum" still work fine). It's as though the "afterDetailEval()" is called twice for each detail record -- but only under Tomcat.

I don't have anything weird in Tomcat config -- I'm only using Tomcat to run Jasper Reports. And everything works (even other reports) except for this Scriptlet doubling its totals. And this is the only scriptlet I have. There's nothing in the Apache or the Tomcat logs on this issue.

I've pulled my hair out over this and Google can't find anything on point -- I hope somebody smarter than me has seen this and can point me in the right direction. At this point I don't even know where to look.

please help.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

 OK, just for other people encountering this problem.....

I was able to toss Google (and especially this forum's seach capabiltiy) and resorted to Bing and found the post below. I had to search all the jars I had placed into Tomcat's /webapps/WEB-INF/lib folder for any class having to do with sciptlets.  Turns out jasperreports-javaflow-4.0.1.jar has a JRBaseCriptlet class and jasperreports-4.0.1.jar defines JRScriptlet and an Exception and Factory class. I removed jasperreports-javaflow-4.0.1.jar from the Tomcat/../../lib folder and the method afterDetailEval() now only gets called once per row. Hope I don't need Javaflow down the road.

 

RE:afterDetailEval called twice 10/01/2009 09:08  

Maybe you have two JR jars on the classpath (see discussion at http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=60369)?

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