Difference between revisions of "Finding resources in JasperReports"

From iDempiere en
Line 1: Line 1:
 +
= Images =
 +
 
Resources such as images that are attachments can be referenced using $P{RESOURCE_DIR}.
 
Resources such as images that are attachments can be referenced using $P{RESOURCE_DIR}.
  
Line 6: Line 8:
 
$P{RESOURCE_DIR} + "image.jpg"
 
$P{RESOURCE_DIR} + "image.jpg"
 
</pre>
 
</pre>
 +
 +
= Resource bundles =
 +
 +
Resource bundles are property files for translating reports into different languages.
 +
 +
By default iDempiere-JasperReports looks for a resource file with the same name as the JasperFile, ie, the Jasperfile is called Report.jasper and then it will look for Report.properties and Report_en_US.properties etc. This might be
 +
practical if you only have one single report and have no need to share translations between different reports.
 +
 +
= Resource bundles in subreports =
  
 
[[Category:JasperReports]]
 
[[Category:JasperReports]]

Revision as of 20:47, 6 September 2013

Images

Resources such as images that are attachments can be referenced using $P{RESOURCE_DIR}.

An image path would look like

$P{RESOURCE_DIR} + "image.jpg"

Resource bundles

Resource bundles are property files for translating reports into different languages.

By default iDempiere-JasperReports looks for a resource file with the same name as the JasperFile, ie, the Jasperfile is called Report.jasper and then it will look for Report.properties and Report_en_US.properties etc. This might be practical if you only have one single report and have no need to share translations between different reports.

Resource bundles in subreports

Cookies help us deliver our services. By using our services, you agree to our use of cookies.