pauliusbau Posted July 3, 2014 Share Posted July 3, 2014 0 down vote favorite I've been struggling with this issue for the last several days and can not figure out a workaround... Maybe somebody will be able to help me :)I am trying to make a jasperserver report with dynamic images, stored on a network (shared network folder on different windows machine).In iReport I define Image Expression as \SERVER_NAMEIMAGES\CAMERA_NAME\000-000.jpg Image Expression Class as java.lang.String - everything works fine.Even getting the image location and file name from the DB and forming Image Expression like so: $F{ADRESSS}+"\"+$F{CAMERA_NAME}+"."+$F{FILE_NAME} is no problem at all. But when I upload my working report onto JasperServer, I get a lot of errors and nothing is being displayed.I have tried defining static part of the image path like a string parameter and have tried changing Image Expression Class to every possible option with no result :(I know that by default jasperserver wants all the images to be somewhere in repo: or be accessed via a web url, but in my case this is not an option: I can not copy all the images to a repo or store them locally, because I have to many of them (TB or so). Also I can not "publish" and make them accessible via web url due to security reasons.Maybe someone has experienced the same problem and knows a solution? Or maybe I am trying to do the impossible thing here?P.S.: I am running JasperServer CE 5.5 on Win Server 2008 R2 machine.Warehouse server holding several TB of images in its file-structure is also running on Win Server 2008 R2.Both jasperserver and image warehouse machines see each other via the network (tested by running iReport report on jasperserver machine). Link to comment Share on other sites More sharing options...
hozawa Posted July 3, 2014 Share Posted July 3, 2014 Just tested this. Just use URL and use something like the folliowing (just drag the image to IE to get the exact URL for you image).file:///C:/img/test.png Link to comment Share on other sites More sharing options...
pauliusbau Posted July 4, 2014 Author Share Posted July 4, 2014 Strange enough "file:///C:/img/test.png" works perfectly. But when I try to access mapped network disk (file:///X:/img/test.png or file://server//img/tens.png), it doesn't work. Every time I get similar error: net.sf.jasperreports.engine.JRException: Byte data not found at : file:///X:/img/test.png Link to comment Share on other sites More sharing options...
mpalacios Posted August 6, 2014 Share Posted August 6, 2014 Hi,I'm working on a similar report. It will display images stored in a remote server. I built the Path in the same way but I get this error:Repository file resource /reports/Staging/Image_test_files/image (12).jpeg could not be loadedThanks for your help. Link to comment Share on other sites More sharing options...
sebouhh Posted April 16, 2019 Share Posted April 16, 2019 We are encoutering the same issue. Did you manage to solve it? 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