Jasper Server: image absolute path to shared network drive

0

 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_NAME\IMAGES\\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).
 

pauliusbau's picture
Joined: Oct 12 2011 - 3:30am
Last seen: 4 years 1 month ago

2 Answers:

0

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

hozawa's picture
52422
Joined: Apr 24 2010 - 4:31pm
Last seen: 5 months 6 days ago

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

pauliusbau - 5 years 4 months ago

We are encoutering the same issue. Did you manage to solve it?

sebouhh - 7 months 2 days ago
0

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 loaded

Thanks for your help.

 

 

mpalacios's picture
Joined: May 7 2013 - 6:05am
Last seen: 1 year 7 months ago
Feedback