}
if (element instanceof SubReport &&
reportElement instanceof AbstractRootLevelBand)
{
final AbstractRootLevelBand re = (AbstractRootLevelBand) reportElement;
final int count = re.getSubReportCount();
for (int i = 1; i < count; i++)
{
final SubReport sr = re.getSubReport(i);
if (sr == element)
{
re.removeSubreport(sr);
re.addSubReport(i - 1, sr);
return new CompoundUndoEntry
(new BandedSubreportEditUndoEntry(re.getObjectID(), i, sr, null),
new BandedSubreportEditUndoEntry(re.getObjectID(), i - 1, null, sr));
}
}
}
final Band parentBand = (Band) reportElement;