Jump to content
We've recently updated our Privacy Statement, available here ×

jhamilton

Members
  • Posts

    1
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by jhamilton

  1. We are using the image component to display a photo within a report. One of the requirements is that when the photo cannot be found then a blank space should be placed there instead. The photos are retrieved from via an internal http request like this: http://127.0.0.1/_common/lib/photo?type=student&id=0000&w=256&h=256&notfound=404 If a photo could not be found the above script would return a 404 error. Prior to upgrading to JasperReports 4.1 (using 4.0.2 Javaflow), setting the onErrorType property for images to Blank would result in the correct behaviour of a blank image. Since upgrading (to fix another issue with justified text and padding), any requests to the script above by the image would generate an error and the report would not run: net.sf.jasperreports.engine.JRException: Error opening input stream from URL : http://127.0.0.1/_common/lib/photo?type=student&id=0000&w=256&h=256&notfound=404 Here is currently how we are using the image: <image scaleImage="RetainShape" hAlign="Center" vAlign="Middle" isUsingCache="true" isLazy="false" evaluationTime="Now" onErrorType="Blank"><reportElement positionType="FixRelativeToTop" stretchType="NoStretch" isPrintRepeatedValues="true"x="0" y="80" width="79" height="79" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="false"isPrintWhenDetailOverflows="false"></reportElement><imageExpression class="java.lang.String"><![CDATA["http://127.0.0.1/_common/lib/photo?type=student&id=" + URLEncoder.encode($P{EXTERNAL_ID}) + "&w=256&h=256&notfound=404"]]></imageExpression></image> Reverting back to 4.0.2 Javaflow rectifies the issue but is not ideal as the justified text fix is also required. Is there any extra properties we can set to get back the old behaviour or is this a problem with 4.1? Thanks,James
×
×
  • Create New...