Jump to content

SCRIPTLET uses problem


mhbashar1

Recommended Posts

I m a newbie.Can anybody tell me how to create scriptlet.I tried but it didnt work.I use iReport 2.0.2.What I did was-first going to Edit>Scriptlet editor,I write the following code-

Code:
import net.sf.jasperreports.engine.*;
public class Utility extends it.businesslogic.ireport.IReportScriptlet {

/** Creates a new instance of JRIreportDefaultScriptlet */
public Utility() {
}
public String getText()
{
return "Hello world";
}
}

Then I saw that a java file named DemoScriptlet.java is created where I saved my report file.But if I name the class- Utility,then how did iReport name it-DemoScriptlet.java.?Then I first wrote-

" new Utility().getText()" in the expression editor of a text field,then I wrote "$P{REPORT_SCRIPTLET}.getText()" but none worked,it says-

net.sf.jasperreports.engine.JRException: Error compiling report java source files : D:Documents and SettingsTonuMy DocumentsMyProjectMemoRmiReportDemoScriptlet.java

Where was my problem,Can anybody give me a clear idea about SCRIPTLET pls

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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