neowarp Posted November 25, 2010 Share Posted November 25, 2010 Hello,im currently working on integrating a report into an app and therefore created a scriplet topreprocess my data. While doing so i stumbled accros a strange behaviour of the scriplet/ireport.Ive stripped down the code and the report to the bare minmum but i cant find the cause.The report contains a variable that calls a function in the scriptlet with a constant.For some odd reason the function is called 3 times. Ive used a try catch to print out the stacktrace and it seems that jasper calls this multiple times. Is there anything that i am missing on how to use scriptlets here? From what im thinking the function should only be called once and not three times.Ive attached both the compiled scriptlet and source aswell as the report file is used for debugging. The report output shows that the function is called three times.Anyone has an idea? Thanks in advanceneowarp Link to comment Share on other sites More sharing options...
dvella Posted February 16, 2011 Share Posted February 16, 2011 Did you ever figure anything out on this? I have the same issue and I just basically created a boolean condition around the core code in the java file so it only will run once.. But I have no idea why things are being called that many times. Link to comment Share on other sites More sharing options...
neowarp Posted February 17, 2011 Author Share Posted February 17, 2011 Sadly i was not able to really resolve the described issue. The example i posted was really a very very stripped down version of the problem i had.Funny enough i could resolve my problem differently (i had filters set in my query instead ofa where clause because i thought the filters were applied during data fetching and not afterwards) Still i think there is a bug here. If you look at the trace, the scriptlet is already called twice beforeafterReportInit() is even called followed by a final call. The example doesnt use any dataset sothat cant be the issue here eighter. sorry that i cant be of much help here. cheersneowarp 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