final MasterReport report = new MasterReport();
report.setPageDefinition(new SimplePageDefinition(PageSize.A3, PageFormat.LANDSCAPE, new Insets(0, 0, 0, 0)));
report.setDataFactory(new TableDataFactory("query", tableModel));
report.setQuery("query");
final ContextAwareDataSchemaModel dataSchemaModel = new DesignTimeDataSchemaModel(report);
final CrosstabBuilder builder = new CrosstabBuilder(dataSchemaModel);
builder.addRowDimension(ROW_DIMENSION_A);
builder.addRowDimension(ROW_DIMENSION_B);
builder.addColumnDimension(COLUMN_DIMENSION_A);