venture Posted October 26, 2008 Share Posted October 26, 2008 I just started to learn how to use scriptlets. I have the iReports documentation and the JasperReports documentation. I must say I am not happy that the single chapter on the use of scriptlets does not have a good example nor of how to fix things.I have examined the demo sample scriptlet in the jasperreports but could not duplicate.I want to use the internal scriptlet rather than a separate IDE to create the class.When compiling inside iReports I get a class not found error and the name of my scriptlet class. I do nto know if it trying to find the class of the scriptlet or some other class is missing. I get same message when useing the demo/sample/scriplet.I have the classpath set up I think ok. How to get more info on what specifically is going wrong?iReports 3.0.0.I have searched the forum but found no good responses. IS there any straight forward tutorial or exampel of set up?I am an experienced java programmer and use Eclispe IDE. But I was hoping that the internal scriplet would be the better approach.Thanks in advance if anyone has pointers. Link to comment Share on other sites More sharing options...
venture Posted October 27, 2008 Author Share Posted October 27, 2008 Update:I finally find an obscure reference in the forum to add tools.jar to the classpath. This seemed to fix most of the error in compiling the script. However, another forum (not this one) indicated that perhaps I have to use the java compiler with the tools.jar as the iReport compiler rather than that built-in. I did that (JDK 1.6) and now the scriplet compiles.However there is much lacking in the documentation that shouild be there for the price paid for the documentation (it does nto seem very much up to date). The next part of the problem is how to use the method in the scriptlet properly in the report.Any other pointers to scriplet usage in the body of the report e.g. in a where clause such as:$P!{REPORT_SCRIPLET}.mymethod() Gives an error of class not found exception for the class that I named in the scriplet. Link to comment Share on other sites More sharing options...
vishal29bhp Posted June 4, 2009 Share Posted June 4, 2009 Have you able to run Scriptlet now Vishal 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