Finding resources in JasperReports

From iDempiere en

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.

When https://idempiere.atlassian.net/browse/IDEMPIERE-1215 has been resolved you can also specify a custom name on the Resource Bundle. This enables you to share resource bundles between reports.

NOTE! iDempiere doesn't handle resource bundles with country specific languange until after IDEMPIERE-1215 have been resolved.

Resource bundles in subreports

Currently iDempiere doesn't support resource bundles in subreports when the resource bundle is defined in the subreport. However, if you have a resource bundle in the main report you can pass that resource bundle to the subreport like this:

ResourceBundleInSubreport.png

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