JRCrosstabParameter[] parameters = crosstab.getParameters();
if (parameters != null)
{
for (int i = 0; i < parameters.length; i++)
{
JRCrosstabParameter parameter = parameters[i];
String paramName = parameter.getName();
if (paramName == null || paramName.length() == 0)
{
addBrokenRule("Missing parameter name for crosstab.", parameter);
}
JRExpression expression = parameter.getExpression();
Class expressionClass = null;
if (expression != null)
{
try
{
expressionClass = expression.getValueClass();
if (expressionClass == null)
{
addBrokenRule("Expression class not set for crosstab parameter " + paramName + ".", expression);
}
}
catch (JRRuntimeException e)
{
addBrokenRule(e, expression);
}
}
try
{
Class valueClass = parameter.getValueClass();
if (valueClass == null)
{
addBrokenRule("Class not set for crosstab parameter " + paramName + ".", parameter);
}
else if (expressionClass != null && !valueClass.isAssignableFrom(expressionClass))