Jump to content

Scriptlet: The jasper report does not recognize my java class


Recommended Posts


I can not use scriptlets in jasper studio. I have an error that I do not understand. I'm trying to follow this tutorial:

here is the error below and I have the impression that the jasper report does not recognize the java class.


When I add the TestScriptlet java class, it is not detected here:


net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:1. TestScriptlet cannot be resolved to a type
value = "Fahrenheit" + ((TestScriptlet)parameter_Scriptlet_1_SCRIPTLET.getValue()).CelsiusToFahrenheit(); //$JR_EXPR_ID=10$
2. TestScriptlet cannot be resolved to a type
value = "Fahrenheit" + ((TestScriptlet)parameter_Scriptlet_1_SCRIPTLET.getValue()).CelsiusToFahrenheit(); //$JR_EXPR_ID=10$
3. TestScriptlet cannot be resolved to a type
value = "Fahrenheit" + ((TestScriptlet)parameter_Scriptlet_1_SCRIPTLET.getValue()).CelsiusToFahrenheit(); //$JR_EXPR_ID=10$
3 errors

at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:206)

at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:286)

at com.jaspersoft.studio.editor.preview.view.control.ReportControler.compileJasperDesign(ReportControler.java:476)

at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$15(ReportControler.java:453)

at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:366)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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