law Posted August 14, 2012 Share Posted August 14, 2012 Hi all,I have a small test scriptlet with one method returning a string. I'm not sure how to store the scriptlet in the report or build it.Here is what I have in the scriptlet:import net.sf.jasperreports.engine.JRDefaultScriptlet;import net.sf.jasperreports.engine.JRScriptletException;public class TestScriptlet extends JRDefaultScriptlet { public String testDescription() throws JRScriptletException { return "Hi there!"; }} When I build the scriptlet from a command prompt, I get errors for import statements in the scriptlet:TestScriptlet.java:2: error: package net.sf.jasperreports.engine does not existimport net.sf.jasperreports.engine.JRDefaultScriptlet; ^TestScriptlet.java:3: error: package net.sf.jasperreports.engine does not existimport net.sf.jasperreports.engine.JRScriptletException; ^TestScriptlet.java:5: error: cannot find symbolpublic class TestScriptlet extends JRDefaultScriptlet { ^ symbol: class JRDefaultScriptletTestScriptlet.java:6: error: cannot find symbol public String testDescription() throws JRScriptletException ^ symbol: class JRScriptletException location: class TestScriptlet4 errors If anyone has some experience with this, your help will be much appreciated!Post Edited by liw at 08/14/2012 16:48 Link to comment Share on other sites More sharing options...
law Posted August 14, 2012 Author Share Posted August 14, 2012 The best step-by-step example so far for creating and running scriptlets is at:http://www.opus-college.net/devcorner/iReport-Ultimate-Guide-3.pdfChapter 15 in the pdf file. 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