try
{
final Band visualElement = createTable(dialog.getColumns(), dialog.getHeaderRows(), dialog.getDataRows());
final ElementStyleSheet styleSheet = visualElement.getStyle();
styleSheet.setStyleProperty(ElementStyleKeys.MIN_WIDTH, DEFAULT_WIDTH);
styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, DEFAULT_HEIGHT);
final ReportDocumentContext activeContext = getActiveContext();
final UndoManager undo = activeContext.getUndo();
undo.addChange(ActionMessages.getString("InsertTableAction.UndoName"),
new ElementEditUndoEntry(band.getObjectID(), band.getElementCount(), null, visualElement));