Search in sources :

Example 1 with ReportContent

use of org.activityinfo.legacy.shared.reports.content.ReportContent in project activityinfo by bedatadriven.

the class StaticElementRenderTest method setup.

@Before
public void setup() throws JAXBException {
    report = Reports.parseXml(getClass(), "static.xml");
    report.setContent(new ReportContent());
    report.getContent().setFilterDescriptions(new ArrayList<FilterDescription>());
}
Also used : ReportContent(org.activityinfo.legacy.shared.reports.content.ReportContent) FilterDescription(org.activityinfo.legacy.shared.reports.content.FilterDescription) Before(org.junit.Before)

Example 2 with ReportContent

use of org.activityinfo.legacy.shared.reports.content.ReportContent in project activityinfo by bedatadriven.

the class ReportGenerator method generateReport.

private void generateReport(User user, Report report, Filter inheritedFilter, DateRange dateRange) {
    GeneratorUtils.resolveElementFilter(report, dateRange);
    Filter effectiveFilter = GeneratorUtils.resolveEffectiveFilter(report, inheritedFilter, dateRange);
    for (ReportElement element : report.getElements()) {
        generateElement(user, element, effectiveFilter, dateRange);
    }
    ReportContent content = new ReportContent();
    content.setFileName(generateFileName(report, dateRange, user));
    content.setFilterDescriptions(generateFilterDescriptions(effectiveFilter, Collections.<DimensionType>emptySet(), user));
    report.setContent(content);
}
Also used : DimensionType(org.activityinfo.legacy.shared.command.DimensionType) ReportContent(org.activityinfo.legacy.shared.reports.content.ReportContent) Filter(org.activityinfo.legacy.shared.command.Filter)

Aggregations

ReportContent (org.activityinfo.legacy.shared.reports.content.ReportContent)2 DimensionType (org.activityinfo.legacy.shared.command.DimensionType)1 Filter (org.activityinfo.legacy.shared.command.Filter)1 FilterDescription (org.activityinfo.legacy.shared.reports.content.FilterDescription)1 Before (org.junit.Before)1