final int type = event.getType();
final ExpressionRuntime[] oldRuntimes = new ExpressionRuntime[collectionFunctions.length];
for (int i = 0; i < collectionFunctions.length; i++)
{
final StructureFunction function = collectionFunctions[i];
oldRuntimes[i] = function.getRuntime();
}
if (inlineDataRowRuntime == null)
{
inlineDataRowRuntime = new InlineDataRowRuntime();
}
inlineDataRowRuntime.setState(event.getState());
for (int i = 0; i < collectionFunctions.length; i++)
{
final StructureFunction function = collectionFunctions[i];
function.setRuntime(inlineDataRowRuntime);
}
try
{
// first check the flagged events: Prepare, Page-Start, -end, cancel and rollback
// before heading for the unflagged events ..
if ((type & ReportEvent.PAGE_STARTED) == ReportEvent.PAGE_STARTED)
{
firePageStartedEvent(event);
}
else if ((type & ReportEvent.PAGE_FINISHED) == ReportEvent.PAGE_FINISHED)
{
firePageFinishedEvent(event);
}
else if ((type & ReportEvent.ITEMS_ADVANCED) == ReportEvent.ITEMS_ADVANCED)
{
fireItemsAdvancedEvent(event);
}
else if ((type & ReportEvent.ITEMS_FINISHED) == ReportEvent.ITEMS_FINISHED)
{
fireItemsFinishedEvent(event);
}
else if ((type & ReportEvent.ITEMS_STARTED) == ReportEvent.ITEMS_STARTED)
{
fireItemsStartedEvent(event);
}
else if ((type & ReportEvent.GROUP_FINISHED) == ReportEvent.GROUP_FINISHED)
{
fireGroupFinishedEvent(event);
}
else if ((type & ReportEvent.GROUP_STARTED) == ReportEvent.GROUP_STARTED)
{
fireGroupStartedEvent(event);
}
else if ((type & ReportEvent.REPORT_INITIALIZED) == ReportEvent.REPORT_INITIALIZED)
{
fireReportInitializedEvent(event);
}
else if ((type & ReportEvent.REPORT_DONE) == ReportEvent.REPORT_DONE)
{
fireReportDoneEvent(event);
}
else if ((type & ReportEvent.REPORT_FINISHED) == ReportEvent.REPORT_FINISHED)
{
fireReportFinishedEvent(event);
}
else if ((type & ReportEvent.REPORT_STARTED) == ReportEvent.REPORT_STARTED)
{
fireReportStartedEvent(event);
}
else
{
throw new IllegalArgumentException();
}
}
finally
{
for (int i = 0; i < collectionFunctions.length; i++)
{
final StructureFunction function = collectionFunctions[i];
function.setRuntime(oldRuntimes[i]);
}
}
if (parent != null)
{