diff --git a/src/main/java/org/spin/report_engine/data/ReportInfo.java b/src/main/java/org/spin/report_engine/data/ReportInfo.java index 3f7b574..fdd90ff 100644 --- a/src/main/java/org/spin/report_engine/data/ReportInfo.java +++ b/src/main/java/org/spin/report_engine/data/ReportInfo.java @@ -66,8 +66,8 @@ private ReportInfo(PrintFormat printFormat, QueryDefinition queryDefinition) { AtomicInteger counter = new AtomicInteger(); groupLevels = new HashMap(); printFormat.getGroupItems().stream().sorted(Comparator.comparing(PrintFormatItem::getSortSequence)).forEach(group -> { - group.withSortSequence(counter.getAndIncrement()); - groupLevels.put(counter.get(), group); + group.withSortSequence(counter.get()); + groupLevels.put(counter.getAndIncrement(), group); }); sortingItems = printFormat.getSortingItems(); printFormatId = printFormat.getPrintFormatId();