JRSubreportParameter[] parameters = subreport.getParameters();
if (parameters != null && parameters.length > 0)
{
for(int index = 0; index < parameters.length; index++)
{
JRSubreportParameter parameter = parameters[index];
if (parameter.getName() == null || parameter.getName().trim().length() == 0)
{
addBrokenRule("Subreport parameter name missing.", expression);
}
expression = parameter.getExpression();
if (expression != null)
{
try
{
Class clazz = expression.getValueClass();
if (clazz == null)
{
addBrokenRule("Class not set for subreport parameter expression : " + parameter.getName() + ". Use java.lang.Object class.", expression);
}
}
catch (JRRuntimeException e)
{
addBrokenRule(e, expression);