Skip to main content
Skip table of contents

path specifications for resource files

 To reference resource-files like pictures or sub-reports in reports, the report parameter RESOURCE_PATH can be defined in Jaspersoft Studio (type of file java.lang.String)

This parameter can be used in a report definition as a path direction inside an expression. Via RUNREPORT it is given over to report generation and includes as operational time always the path of the currently run report definition file (.jrxml or .jasper)

An example for the content of the parameter that relies on the location of the given report definition file:

RUNREPORT REPORTXML(‚/ieffect/v2r4m0/report/demo/vda4902_en.jrxml')



The included pathname allways ends with a "/" so by using the parameter in an expression it is not allowed to be used.
The files referenced in combination with RESOURCE_PATH always have to be relative to the path of RESOURCE_PATH.

 Here is an example for the usage of an image-expression.
The .jpg file has to be in the subfolder "images" of the folder of the report definition file as you run RUNREPORT:

Note for usage in iReport:
To make it that you can display your Reports in the preview of iReport, the RESOURCE_PATH parameter has to have a correct DefaultValueExpression.
This expression is used by iReport for creating the preview and as a parameter value.



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.