peter_tonev Posted October 14, 2013 Share Posted October 14, 2013 Hello community, I have a report with a logo in it (jpg). When I call the report using the rest_v2/reports service and use PDF as export format, the logo image gets rendered. If I use HTML though, I only get a broken image icon.My image expression is "repo:/Reports/MyLogo.jpg" where "Reports" is the folder name where both my reports and the image are.I call my report usinghttps://<<myJasperHost>>/jasperserver-pro/rest_v2/reports/Reports/<<myReport>>.htmlandhttps://<<myJasperHost>>/jasperserver-pro/rest_v2/reports/Reports/<<myReport>>.pdfrespectively.My image expressin class is String, but I already tried the others and also all possible options on the image element.How can I reference the image - do I need another REST call (and how would it look like)? Thanks & Cheers,Peter Link to comment Share on other sites More sharing options...
peter_tonev Posted October 16, 2013 Author Share Posted October 16, 2013 Hi there, I now found a workaround myself - a "real" solution though would be better.The workaround is to deploy the image e.g. on a web server within your domain (though this isn't a must have) and point to it using lazy evaluation. Cheers,Peter Link to comment Share on other sites More sharing options...
Teodor Danciu Posted October 16, 2013 Share Posted October 16, 2013 Hi,Can we see the image tag in your JRXML? Do you set it isLazy=true when the image expression points to "repo:"?Thanks,Teodor Link to comment Share on other sites More sharing options...
peter_tonev Posted October 17, 2013 Author Share Posted October 17, 2013 Hi Teodor, the image tag (which works with the PDF exporter) is: "repo:/Reports/MyLogo.jpg" It doesn't work with the XHTML exporter. I'm not sure though whether I simply don't use here the proper image embedding settings or if we possibly have some issue with our application configuration, so the XHTML exporter cannot export the image together with the report. The workaround which functions with XHTML was to deploy the image on a web server within our domain (relative path to it being /styles/img/reports/), then my JRXML image tag looks like: "/styles/img/reports/MyLogo.jpg" Thanx, Peter Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now