if (columnField == null && rowField == null)
{
// special case handling for detail cells.
// detail cells have no filter, and reset on the innermost column group.
// This saves a few bytes as we dont have to run a result-sequence for this case.
final CrosstabColumnGroup group = (CrosstabColumnGroup) groups[groups.length - 1];
final String name = group.getName();
o.setGroup(name);
o.setCrosstabFilterGroup(null);
return true;
}
if (rowField == null)
{
// this is a detail-row.
final CrosstabRowGroup lastRowGroup = findLastRowGroup();
o.setGroup(lastRowGroup.getName());
}
else
{
final CrosstabRowGroup rowGroup = findRowGroup(rowField);
final Section containingBody = rowGroup.getParentSection();
final Section containingGroup = containingBody.getParentSection();
o.setGroup(containingGroup.getName());
}
if (columnField == null)
{
final Group lastColumnGroup = groups[groups.length - 1];
o.setCrosstabFilterGroup(lastColumnGroup.getName());
}
else
{
final CrosstabColumnGroup columnGroup = findColumnGroup(columnField);
final Section containingBody = columnGroup.getParentSection();
final Section containingGroup = containingBody.getParentSection();
if (containingGroup instanceof CrosstabColumnGroup)
{
o.setCrosstabFilterGroup(containingGroup.getName());
}