rjensen11 Posted March 31, 2011 Share Posted March 31, 2011 I am using iReport 4.0.I have a SQL Server 2000 table with an image data type that contains jpegs.I created an image element, with an expression class of java.awt.Image, and an image expression of $F{field_ImgFile}. When I attempt to preview the report, I get the following error:Error filling print... Error evaluating expression : Source text : $F{KOL_BIZ_ProfileImages_ImgFile}Setting up the file resolver... net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : $F{field_ImgFile} at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:195) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:589) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:557) at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:929) at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:1023) at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:1004) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2033) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:877) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: java.lang.ClassCastException: [b cannot be cast to java.awt.Image at report4_1301616473039_287513.evaluate(report4_1301616473039_287513:219) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:182) ... 19 more Thanks for your help!rjensen Link to comment Share on other sites More sharing options...
dgangstaz Posted April 5, 2011 Share Posted April 5, 2011 Your field "field_ImgFile" from your datasource is of type java.awt.Image, or just a blob? 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