Jump to content
  • JSS does not use/retain image onErrorType attribute


    mvcoile
    Assigned User teodord
    CategoryBug report
    PriorityImmediate
    ReproducibilityAlways
    ResolutionFixed
    SeverityBlock
    StatusResolved
    Versionv5.6

    Hi,

     

    JSS does not use/retain image onErrorType attribute. When I set the onErrorType in the editor, it pretends to remember the value but does not go in effect on preview. When saving the file and reopening, it did not save the attribute.

     

    It does, strangely, mark the document as edited when I change the attribute.

     

    v201407231036

     

    Kind regards,

    Maarten @ Yesplan



    User Feedback

    Recommended Comments

    Changed Assigned User from - to @User_306070


    This is also a library issue. Once I've set the attribute in the xml, JSS starts saving the setting. But the preview still does not use the attribute!Test: report with an image and a non working image url string. set the onErrorType to blank or icon. Report will CRASH.Caused by: net.sf.jasperreports.engine.JRException: Image read failed.
    Link to comment
    Share on other sites

    Ah, my testfile got removed.

     

    net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Image read failed.

    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:466)

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

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

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

    Caused by: net.sf.jasperreports.engine.JRException: Image read failed.

    at net.sf.jasperreports.engine.util.JRJdk14ImageReader.readImage(JRJdk14ImageReader.java:73)

    at net.sf.jasperreports.engine.util.JRImageLoader.loadAwtImageFromBytes(JRImageLoader.java:167)

    at net.sf.jasperreports.engine.JRImageRenderer.getImage(JRImageRenderer.java:418)

    at net.sf.jasperreports.engine.JRImageRenderer.getDimension(JRImageRenderer.java:493)

    at net.sf.jasperreports.engine.fill.JRFillImage.fitImage(JRFillImage.java:747)

    at net.sf.jasperreports.engine.fill.JRFillImage.prepare(JRFillImage.java:669)

    at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:332)

    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:384)

    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:358)

    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2069)

    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:788)

    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:298)

    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:152)

    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:963)

    at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:120)

    at java.lang.Thread.run(Thread.java:745)

     

    Link to comment
    Share on other sites

    Changed Status from Feedback Requested to Assigned

    Changed Assigned User from @User_306070 to @teodord


    Hi,The problem is that although the location of the image is valid and indeed delivers an image file, it cannot be loaded as an image by the JVM (invalid image file format?).The JR error handling code should be modified so that exception thrown when loading the image for determining dimension (stretchType=RealSize), be caught and invalid image be replaced at fill time with either blank or icon.Thanks,Teodor
    Link to comment
    Share on other sites

    Hi,

     

    I had to come back to this fix because the solution adopted at the time was not truly honoring the onErrorType attribute of the image, but merely ignoring the exception.

    The new fix will be available in the 6.2.2 release (the release after the next one, later in spring).

     

    Thanks,

    Teodor

    Link to comment
    Share on other sites


×
×
  • Create New...