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
Page 1 of 1
Images relative in HTML report Reference images in HTML in a relative way
#2
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
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
Page 1 of 1






MultiQuote