Jump to content
Changes to the Jaspersoft community edition download ×

Jasper Server: image absolute path to shared network drive


pauliusbau

Recommended Posts

 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

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

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

  • 1 month later...

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.

 

 

Link to comment
Share on other sites

  • 4 years later...

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...