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

Images not loading into JasperServer reports


shanff

Recommended Posts

I've created  a report in iReport 3.1.4 and uploaded the .jrxml file to the latest JasperServer via it's web interface.  I included an image file using the syntax "repo:/images/logo.gif" and verified that it was set in the .jrxml file correctly.  When I run the report from the JasperServer WebGUI, I get the report, with the data I would expect in the correct places, but no image, and the data is copied 214 times.  There looks to be a "frame" where the image should be when the data is loading, but no image shows up.

If I run the report in iReport and set up the repository, I can drag the image to the report and see the correct image on the report at design time, but when I run the report, it dumps out:

"Error filling print...Byte data not found at location : repo:/images/logo.gif

net.sf.jasperreports.engine.JRException: Byte data not foundat location : repo:/images/logo.gif

at net.sf.jasperreports.engine.util.JRLoader.loadBytesFromLocation(JRLoader.java:486) ......

 

If I use a local (to the computer iReport is running on) image, iReport works great. 

How can I get this image to show up correctly from JasperServer WebGUI? 

I'm running on the single download tomcat/mysql bundled JasperServer and have also tried the Bitnami stack with the same results.  It's running on a clean, minimal installation of Centos 5.2.



Any suggestions would be welcomed.


Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Does the SalesByMonth sample report that can be installed with JasperServer work? It has an image in it, accessed with the following JRXML.

 

            <image scaleImage="RetainShape" hAlign="Center" vAlign="Middle" hyperlinkType="None">
                <reportElement x="0" y="10" width="150" height="30"/>
                <imageExpression class="java.lang.String"><![CDATA["repo:/images/JRLogo"]]></imageExpression>
                <hyperlinkTooltipExpression>"JasperReports Logo"</hyperlinkTooltipExpression>
            </image>
 

The "...Byte data not found at location" problem is because the "repo://.." references only work when the report is run on the server.

 

Sherman

Jaspersoft

Link to comment
Share on other sites

  • 3 years later...

repo: Repository.

 

So when you run in server .. the main report will access sub report from server's repository.

 

So try to remove repo from sub-report Expression as shown below.

 

"subreport.jrxml" or give exact physical disk location of subreport.jrxml

 

And run from Application(ireport).

 

Regards,

Ansul Gupta

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...