{
if (processingContext == null)
{
throw new NullPointerException();
}
ReportState parentState = state.getParentSubReportState();
if (parentState == null)
{
return EMPTY_LAYOUTER_LEVEL;
}
MasterDataRow dataRow = state.getFlowController().getMasterRow();
dataRow = dataRow.getParentDataRow();
if (dataRow == null)
{
throw new IllegalStateException("Parent-DataRow in a subreport-state must be defined.");
}
final ArrayList<LayouterLevel> stack = new ArrayList<LayouterLevel>();
while (parentState != null)
{
if (parentState.isInlineProcess() == false)
{
final LayoutExpressionRuntime runtime = createRuntime(dataRow, parentState, processingContext);
stack.add(new LayouterLevel(parentState.getReport(),
parentState.getPresentationGroupIndex(), runtime, parentState.isInItemGroup()));
}
parentState = parentState.getParentSubReportState();
dataRow = dataRow.getParentDataRow();
if (dataRow == null)
{
throw new IllegalStateException("Parent-DataRow in a subreport-state must be defined.");
}