super(jd,dr,layoutManager);
}
protected void registerEntity(Entity entity) {
log.debug("registering group...");
DJGroup djgroup = (DJGroup) entity;
try {
JRDesignGroup group = (JRDesignGroup)transformEntity(djgroup);
getDjd().addGroup(group);
//Variables are registered right after the group where they belong.
String property = djgroup.getColumnToGroupBy().getColumnProperty().getProperty();
if (djgroup.getFooterLabel() != null && djgroup.getFooterLabel().getLabelExpression() != null) {
registerCustomExpressionParameter(group.getName() + "_labelExpression", djgroup.getFooterLabel().getLabelExpression());
}
// ColumnsGroupFieldVariablesRegistrationManager fieldVariablesRM = new ColumnsGroupFieldVariablesRegistrationManager(getDjd(),getDynamicReport(),getLayoutManager(), group);
// fieldVariablesRM.registerEntities(djgroup.getFieldVariables());
DJGroupVariableDefRegistrationManager variablesRM = new DJGroupVariableDefRegistrationManager(getDjd(),getDynamicReport(),getLayoutManager(), group);
variablesRM.registerEntities(djgroup.getVariables());
ColumnsGroupVariablesRegistrationManager headerVariablesRM = new ColumnsGroupVariablesRegistrationManager(ColumnsGroupVariablesRegistrationManager.HEADER, property, getDjd(),getDynamicReport(),getLayoutManager());
headerVariablesRM.registerEntities(djgroup.getHeaderVariables());
ColumnsGroupVariablesRegistrationManager footerVariablesRM = new ColumnsGroupVariablesRegistrationManager(ColumnsGroupVariablesRegistrationManager.FOOTER, property, getDjd(),getDynamicReport(),getLayoutManager());
footerVariablesRM.registerEntities(djgroup.getFooterVariables());
DJCrosstabRegistrationManager headerCrosstabsRm = new DJCrosstabRegistrationManager(ColumnsGroupVariablesRegistrationManager.HEADER, getDjd(),getDynamicReport(),getLayoutManager());
headerCrosstabsRm.registerEntities(djgroup.getHeaderCrosstabs());
DJCrosstabRegistrationManager footerCrosstabsRm = new DJCrosstabRegistrationManager(ColumnsGroupVariablesRegistrationManager.FOOTER, getDjd(),getDynamicReport(),getLayoutManager());
footerCrosstabsRm.registerEntities(djgroup.getFooterCrosstabs());
} catch (JRException e) {
throw new EntitiesRegistrationException(e.getMessage(),e);
}
}