public static LayoutExpressionRuntime getExpressionRuntime
(final FlowController fc, final Object node)
{
final LayoutExpressionRuntime ler = new LayoutExpressionRuntime();
ler.setConfiguration(fc.getReportJob().getConfiguration());
ler.setReportContext(fc.getReportContext());
final GlobalMasterRow masterRow = fc.getMasterRow();
ler.setDataRow(masterRow.getGlobalView());
final ReportDataRow reportDataRow = masterRow.getReportDataRow();
if (reportDataRow == null)
{
ler.setData(EMPTY_REPORT_DATA);
ler.setCurrentRow(-1);
}
else
{
ler.setData(reportDataRow.getReportData());
ler.setCurrentRow(reportDataRow.getCursor());
}
ler.setDeclaringParent(node);
return ler;
}