I need to get the parameters defined in a jasper file so I can generate inputs depending of the type of these parameters to fill the report.
I'm working with jasperreports-5.0.0
JasperReport jasperReport = (JasperReport)JRLoader.loadObject(new File("report.jasper"));
JRParameter[] params = jasperReport.getParameters();
for(JRParameter param : params) {
if(!param.isSystemDefined() && param.isForPrompting()){
param.getName();
param.getDescription();
param.getDefaultValueExpression();
param.getNestedTypeName();
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With