satheesh.k Posted May 31, 2016 Share Posted May 31, 2016 Hi,I am trying to generate image from postgresql bytea type field,When i preview the report , then i getting error like below,Error filling print... Error evaluating expression : Source text : $F{binary}net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : $F{binary} 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.fillBandNoOverflow(JRVerticalFiller.java:439) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageHeader(JRVerticalFiller.java:403) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:264) 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:878) 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.io.InputStream at Test_1464690468421_172331.evaluate(Test_1464690468421_172331:163) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:182) ... 19 morePrint not filled. Try to use an EmptyDataSource...Please help me how can i rectify this issue. Link to comment Share on other sites More sharing options...
serhatcelik Posted May 31, 2016 Share Posted May 31, 2016 Dear Sathees.k,Please look at https://serhatcelik.wordpress.com/2015/07/15/how-to-show-blob-image-in-ireport-and-spagobi/I hope it helps you and please let me know if it works.Good luck. Link to comment Share on other sites More sharing options...
serhatcelik Posted May 31, 2016 Share Posted May 31, 2016 Dear Sathees.k,Please look at https://serhatcelik.wordpress.com/2015/07/15/how-to-show-blob-image-in-i...I hope it helps you and please let me know if it works.Good luck. Link to comment Share on other sites More sharing options...
satheesh.k Posted May 31, 2016 Author Share Posted May 31, 2016 Thank you for reply.How can i add blob filed in my postgresql,can you please share me sample.This is my Postgresql:select im.binarydatafrom nv_projectoverview poinner join ad_image im on(im.ad_image_id = po.project_header_id Link to comment Share on other sites More sharing options...
serhatcelik Posted May 31, 2016 Share Posted May 31, 2016 Dear Sathees.k,You will add blob image column to your sql. I don't have any experience in postgresql. Link to comment Share on other sites More sharing options...
hozawa Posted June 1, 2016 Share Posted June 1, 2016 Check the following thread. It seems to be the same problem you're having and have a resolution too.http://community.jaspersoft.com/questions/537110/postgresql-bytea-image-problem Link to comment Share on other sites More sharing options...
satheesh.k Posted June 8, 2016 Author Share Posted June 8, 2016 Still this issue occuring,please help me any one with exact solution. Link to comment Share on other sites More sharing options...
satheesh.k Posted June 8, 2016 Author Share Posted June 8, 2016 Dear serhatcelik,Still this issue not yet resolved,kindly help how to create blob image from binary data. 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