Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023137Openbravo ERP00. Application dictionarypublic2013-02-21 11:322013-03-17 08:53
caristu 
AugustoMauch 
highminoralways
closedfixed 
5
pi 
3.0MP223.0MP22 
shankarb
Core
No
0023137: Report not shows images with html output format
If we create a .jrxml with images, and configure a report in the application dictionary for showing it, the images don't appear using an html output format.
1) Replace the ReportPurchaseOrder.jrxml from WebContent/src-loc/design/org/openbravo/erpCommon/ad_reports/ and src/org/openbravo/erpCommon/ad_reports/ with the one attached in this issue. It is the same as the original, but it has an image in the top right corner.
2)As group admin role, execute the Purchase Order Report using the pdf output format: the image is displayed correctly
3)Execute the same report using the html output format: the image is not displayed
The html file generates the image with an invalid path: <img src="./PrintJR_files/nullimg_0_0_1" style="width: 174pt" alt="">

The html file is generated in the HttpSecureAppServlet.java, using the JRHtmlExporter class. Seems that the solution could be to use a special ImageServlet to locate the images:
http://community.jaspersoft.com/jasperreports-library/issues/2373 [^]
http://www.coderanch.com/t/466659/open-source/Jasper-reports-generating-html-files [^]
No tags attached.
? ReportPurchaseOrder.jrxml (38,950) 2013-03-13 13:50
https://issues.openbravo.com/file_download.php?file_id=6025&type=bug
Issue History
2013-02-21 11:32caristuNew Issue
2013-02-21 11:32caristuAssigned To => AugustoMauch
2013-02-21 11:32caristuModules => Core
2013-02-21 11:32caristuResolution time => 1367964000
2013-02-21 11:32caristuTriggers an Emergency Pack => No
2013-02-21 11:32caristuversion => pi
2013-02-21 11:32caristuTarget Version => 3.0MP22
2013-03-13 13:50AugustoMauchFile Added: ReportPurchaseOrder.jrxml
2013-03-13 13:55AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=4499#r4499
2013-03-13 13:58AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=4500#r4500
2013-03-13 17:48AugustoMauchIssue Monitored: shankarb
2013-03-13 17:48AugustoMauchReview Assigned To => shankarb
2013-03-13 17:49hgbotCheckin
2013-03-13 17:49hgbotNote Added: 0057235
2013-03-13 17:49hgbotStatusnew => resolved
2013-03-13 17:49hgbotResolutionopen => fixed
2013-03-13 17:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/19f62f21ac43ee3c24311130da8e2ed66b8f6b24 [^]
2013-03-17 08:53shankarbNote Added: 0057278
2013-03-17 08:53shankarbStatusresolved => closed
2013-03-17 08:53shankarbFixed in Version => 3.0MP22

Notes
(0057235)
hgbot   
2013-03-13 17:49   
Repository: erp/devel/pi
Changeset: 19f62f21ac43ee3c24311130da8e2ed66b8f6b24
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Mar 13 17:48:10 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/19f62f21ac43ee3c24311130da8e2ed66b8f6b24 [^]

Fixes issue 23137: Jasper reports show images in html output format

It was needed to use the ImageServlet servlet and to set in the session the filled jasper report in the DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE attribute.

---
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
M src/org/openbravo/erpCommon/utility/PrintJR.java
---
(0057278)
shankarb   
2013-03-17 08:53   
Code Reviewed and tested in pi changeset c1cf111b6a22