Error Getting Like "net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : $F{binary} "

0

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 more
Print not filled. Try to use an EmptyDataSource...

Please help me how can i rectify this issue.

satheesh.k's picture
Joined: May 31 2016 - 3:24am
Last seen: 5 years 6 days ago

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.

 

serhatcelik - 5 years 2 weeks ago

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.binarydata
from nv_projectoverview po
inner join ad_image im on(im.ad_image_id = po.project_header_id

 

satheesh.k - 5 years 2 weeks ago

5 Answers:

0

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.

serhatcelik's picture
Joined: Sep 25 2014 - 3:58pm
Last seen: 4 years 9 months ago
0

Dear Sathees.k,

You will add blob image column to your sql. I don't have any experience in postgresql.

 

 

 

serhatcelik's picture
Joined: Sep 25 2014 - 3:58pm
Last seen: 4 years 9 months ago
0

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

hozawa's picture
71959
Joined: Apr 24 2010 - 4:31pm
Last seen: 2 years 5 days ago
0

Still this issue occuring,please help me any one with exact solution.

 

satheesh.k's picture
Joined: May 31 2016 - 3:24am
Last seen: 5 years 6 days ago
0

Dear serhatcelik,

Still this issue not yet resolved,kindly help how to create blob image from binary data.

satheesh.k's picture
Joined: May 31 2016 - 3:24am
Last seen: 5 years 6 days ago
Feedback