use of org.activityinfo.legacy.shared.reports.model.PivotTableReportElement in project activityinfo by bedatadriven.
the class DummyPivotTableData method Foobar1612Element.
public PivotTableReportElement Foobar1612Element() {
PivotTableReportElement element = new PivotTableReportElement();
element.setTitle("Foobar 1612");
element.setRowDimensions(rowDims);
element.setColumnDimensions(colDims);
element.setContent(new PivotContent(table, new ArrayList<FilterDescription>()));
return element;
}
use of org.activityinfo.legacy.shared.reports.model.PivotTableReportElement in project activityinfo by bedatadriven.
the class DummyPivotTableData2 method testElement.
public PivotTableReportElement testElement() {
PivotTableReportElement element = new PivotTableReportElement();
element.setTitle("Foobar 1612");
element.setRowDimensions(rowDims);
element.setColumnDimensions(colDims);
element.setContent(new PivotContent(table, new ArrayList<FilterDescription>()));
return element;
}
use of org.activityinfo.legacy.shared.reports.model.PivotTableReportElement in project activityinfo by bedatadriven.
the class PivotTableTemplate method createElement.
@Override
public void createElement(AsyncCallback<ReportElement> callback) {
PivotTableReportElement table = new PivotTableReportElement();
table.addColDimension(new DateDimension(DateUnit.YEAR));
table.addColDimension(new DateDimension(DateUnit.MONTH));
table.addRowDimension(new Dimension(DimensionType.Partner));
callback.onSuccess(table);
}
use of org.activityinfo.legacy.shared.reports.model.PivotTableReportElement in project activityinfo by bedatadriven.
the class PivotTableRendererTest method veryLongFilter.
@Test
public void veryLongFilter() {
// input test data : element + content
DummyPivotTableData2 testData = new DummyPivotTableData2();
PivotTableReportElement element = testData.testElement();
// Filtering on 4000 indicators....
Map<Integer, String> labelMap = Maps.newHashMap();
for (int i = 1; i != 10000; ++i) {
element.getFilter().addRestriction(DimensionType.Indicator, i);
labelMap.put(i, "Very long indicator name " + i);
}
element.getContent().getFilterDescriptions().add(new FilterDescription(DimensionType.Indicator, labelMap));
// Destination book
HSSFWorkbook book = new HSSFWorkbook();
// CLASS under test
ExcelPivotTableRenderer renderer = new ExcelPivotTableRenderer();
renderer.render(book, element);
}
use of org.activityinfo.legacy.shared.reports.model.PivotTableReportElement in project activityinfo by bedatadriven.
the class PivotTableRendererTest method exportWithInvalidCharsInSheetnames.
// AI-1413
@Test
public void exportWithInvalidCharsInSheetnames() {
PivotTableReportElement element = new DummyPivotTableData2().testElement();
element.setTitle("CPSC: 4Ws");
ExcelPivotTableRenderer renderer = new ExcelPivotTableRenderer();
renderer.render(new HSSFWorkbook(), element);
}
Aggregations