Pentaho 5.3 - How to read a property in PRPT files

1k views Asked by At

I need to set a value in a properties file and then read this value in a PRPT in Pentaho 5.3.If I understand it, the file where to add my property is design-tools/report-designer/resources/classic-engine.properties (Report Designer) and server/biserver-ee/tomcat/webapps/pentaho/WEB-INF/classes/classic-engine.properties (BI server, once published).That's right? If so, could you tell me how I can read this value (example, pentaho.images.path=c:/myProject/images/) in my PRPT file? If not, could you explain to me how to do? Thank you!

1

There are 1 answers

0
alcott80 On BEST ANSWER

I found a solution... I write it if that can be useful to someone. Files listed in question are correct. We need write in classic-engine.properties:

org.pentaho.reporting.engine.classic.core.environment.pentahoImgPath=c:/myProject/images/
org.pentaho.reporting.engine.classic.core.env-mapping.pentahoImgPath=env\:\:pentahoImgPath

Restart the Report Designer. Now, we have a new environment variable in PRPT file once opened with the Report Designer, env::pentahoImgPath The value is contained in "org.pentaho.reporting.engine.classic.core.environment.pentahoImgPath" key (c:/myProject/images/). Bye.

Andrea