[#12351] - JRParameter getDescription is always null

Bug report
Project: Severity:
Works as Designed
Component: Reproducibility:
Assigned to:

hi ,
I want to import the parameters description in java code and I get always null value . Example :

in jrxml file :
<parameter name="input0" class="java.lang.String">
<parameterDescription><![CDATA[bla bla]]></parameterDescription>

in java code:

logger.debug("found text params name...... " + param.getName() + " parameter description " + param.getDescription() + " is for prompting " + param.isForPrompting());

output :

found text params name...... input0 parameter description null is for prompting true

Does the description attribute value is passed or not ? I have tried more type of parameters and I get always null . There is something wrong in jrxml source maybe ?

Thank in advance

jasper library
someUser's picture
Joined: Sep 7 2011 - 1:09pm
Last seen: 5 days 8 hours ago


  • Assigned:nobody» shertage
  • Status:New» Feedback Requested


please post the JRXML sample file and the entire Java code snippet, in order to help us to reproduce the issue.

Thank you.

  • Resolution:Open» Unable to Reproduce

I have already added example or jrxml file and java log. Is about passing any prompted parameter description from jrxml to java code . The description is null .

JRParameter[] params = jasperReport.getParameters();
for (JRParameter param : params) {
logger.debug("params name...... " + param.getName() + " parameter description " + param.getDescription() + " is for prompting " + param.isForPrompting());


Binary Data jasperexample.jrxml1.98 KB

we tested the jasperexample.jrxml sample and got correct values for input0 and input1 parameter descriptions. Attached are jasperexample.jasper (the compiled report) and jasperexample.jasper.jrxml (the re-decompiled report) files. You can see that parameter descriptions were preserved from the initial jasperexample.jrxml sample file to jasperexample.jasper.jrxml decompiled version.
The jasperexample.jasper and jasperexample.jasper.jrxml were generated using the specific ant 'compile' and 'decompile' tasks available in the JR library samples distro.
Anyway, how did you obtain the jasperReport object in the Java code? Did you use JasperCompileManager or JRXmlLoader class?

Thank you,

Binary Data jasperexample.jasper17.95 KB
Binary Data jasperexample.jasper.jrxml1.87 KB



I have extracted a part of code :

File initialFile = new File(jrxmlPATH + reportFile);
InputStream targetStream = new FileInputStream(initialFile);
JasperDesign jasperDesign = JRXmlLoader.load(targetStream);
JasperReportsContext reportsContext = new SimpleJasperReportsContext();
JRPropertiesUtil.getInstance(reportsContext).setProperty(JRCompiler.COMPILER_PREFIX + JRReport.LANGUAGE_JAVA, JRJdtCompiler.class.getCanonicalName());
JasperCompileManager jasperCompilerManager = JasperCompileManager.getInstance(reportsContext);
JasperReport report = jasperCompilerManager.compile(jasperDesign);


We have made tests on our side and there does not seem to be anything wrong with this property.
If you are in control of this application you are developing, then maybe you can perform some debugging and if the problem persist, you could maybe point us to where the problem is in our library, if any.
You can have the source code of the library and thus debugging on your side should not be a problem.

Thank you,

  • Resolution:Unable to Reproduce» Works as Designed

Ah sorry, indeed is working , I was using jrxml file from a different branch. Sorry for the time spent to solve this. I promise to check well in the future when I will be back to you with something :) .
Thanks a lot for help and patience , you can close this ticket. ,

  • Reproducibility:Always» N/A
  • Status:Feedback Requested» Closed