parkinson.philip Posted July 20, 2014 Posted July 20, 2014 I am a jasper studio newb but I have put in a decent search for an answer before posting.I was just testing out a simple expression in Jasper Studio 5.6.0, namely LEFT(fieldname,4). The field is a string. The expression editor parsed it OK.However it compiles with the error below when I attempt a preview. Almost like it cannot find the TextFunctions.class though when I browse in project explorer it appear to be under this jar."jasperreports-functions-5.6.0-SNAPSHOT.jar"Any advice?***************************************************************net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:1. net.sf.jasperreports.functions.standard.TextFunctions cannot be resolved to a type return getFunctionSupport(net.sf.jasperreports.functions.standard.TextFunctions.class).LEFT(arg0, arg1); <--------------------------------------------------->2. net.sf.jasperreports.functions.standard.TextFunctions cannot be resolved to a type return getFunctionSupport(net.sf.jasperreports.functions.standard.TextFunctions.class).LEFT(arg0); <--------------------------------------------------->2 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:204) at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:172) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.compileJasperDesign(ReportControler.java:394) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$14(ReportControler.java:382) at com.jaspersoft.studio.editor.preview.view.control.ReportControler$4.run(ReportControler.java:315) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
rajesh.sirsikar Posted July 21, 2014 Posted July 21, 2014 Can you quickly send me a screenshot of your expression editor window. I tried replicating the error, but could not. I am able to use LEFT Function and its working fine.
rajesh.sirsikar Posted July 21, 2014 Posted July 21, 2014 I have created a Variable with String Class and teh expression is as followsThis works and I have got teh perfect result.
parkinson.philip Posted July 22, 2014 Author Posted July 22, 2014 Well after deleting the problem control and recreating (a fourth time) it worked. Syntax looked fine the first time so go figure.
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