raulsaavedrax Posted July 11, 2007 Share Posted July 11, 2007 hi, i can't compile my report that use a scriptlet. i don't know how is using the scriptlet and the class. please, if somebody can help me, i willl very happy. i need a single example with source code, about the scriplet in iReport. thanks Link to comment Share on other sites More sharing options...
codyjasperForge Posted July 11, 2007 Share Posted July 11, 2007 Make sure that both the .class file and the .java file have the same name as your report. i.e. If your report is called 'abc.jrxml', then your scriptlet .class file should look like 'abc.class' The same goes for the '.java ' file... Both of these should be saved in the same directory as the .jrxml file IF you are using the internal editor. Also once you have double checked all of these scenarios,check your actual java code for any syntax errors or misuse of functionalities. Hope this helps... Link to comment Share on other sites More sharing options...
raulsaavedrax Posted July 11, 2007 Author Share Posted July 11, 2007 hi codyjasperForge, thanks for your help. i don't know that my report have a .class file...? how it is created? i'm confused. do you can give me an example...? attaching the source files, .xml, .class or .java? please thanks Link to comment Share on other sites More sharing options...
codyjasperForge Posted July 11, 2007 Share Posted July 11, 2007 http://jasperreports.sourceforge.net/tips.tricks.htmlhttp://jasperforge.org/sf/wiki/do/viewPage/projects.jasperreports/wiki/Samples raulsaaavedrax, When you compile a scriptlet class, both a .class file and a .java file should be created by default. Sometimes, though if the .class file does not get created, you can trick the application into reading a .class file that is really a .java file. Simply make a copy of the compiled .java file, rename it with the same name and a .class extension (instead of .java). The next time you compile your report, it should(i hope) think that this is the .class file it neeeds and then it will overwrite whats there to make a new actual .class file. I'm sorry I can't be more specific, but I have tried this and it seemed to work for me. I may be wrong, but it is worth a try. Let me know what happens. (abc.java) -> cpy -> paste -> rename to abc.class -> compile... reply :P Hope this helps... 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