How do you handle jasper reports where the image path is different at runtime vs in the editor?
Here's an example:
I have a report definition in the folder /src/main/resources/reporttemplates/MyReport.jrxml
That report includes an image located at /src/main/resources/reporttemplates/images/MyImage.png
When referring to the image in the editor it appears to accept two different path types:
Either the absolute project path: "/src/main/resources/reporttemplates/images/MyImage.png" or or a relative path based on the report definition's directory: "images/MyImage.png"
However, at runtime the path needs to change. In my case, when the project is built and deployed to Tomcat, the path to the image needs to be relative to the web app's classes folder: "reporttemplates/images/MyImage.png".
Any tricks to make this work?