BIRT Exchange Forum: Images relative in HTML report - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Images relative in HTML report Reference images in HTML in a relative way Rate Topic: -----

#1 User is offline   locutuz Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 24
  • Joined: 25-October 11


Posted 23 July 2012 - 05:55 AM

Hello everybody,

I have a stand-alone report application, that generates HTML-reports and stores it to a specified location.
Therefore I have a special directory-structure, e.g.:
C:\temp\output // main output folder
MyReport.html
C:\temp\output\resources // contains images
MyImage01.png

When I open the generated HTML file I see that the "src"-attribute of the IMG-tag references the file in an absolute way:

<img src="file:/C:/temp/output/resources/MyImage01.png"></img>

This is not good, because so the report can only be shown on a system where the directory structure is identical!


What I want is a relative reference like this:

<img src="file:./resources/MyImage01.png"></img>

The absolute part is replaced by the '.' that points to the current directory.

Is it possible to configure the ReportEngine in that way?
Unfortunately I didn't find an answer in the BIRT-books or the internet.


Thanks for your help!

Regards,
Sebastian
0

#2 User is offline   Jackie Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 15-November 12


Posted 05 December 2012 - 05:58 PM

Hi Sebastian,

I am new for birt. but I hope to give some help because I often be helped by other good guys.

Have a try this <img src="resources/MyImage01.png"></img>, without the "file:./" if the resources file in the same folder with the caller page.

Regards
Jackie
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users