Skip to content

Commit

Permalink
Fixed error with detail for report
Browse files Browse the repository at this point in the history
  • Loading branch information
yamelsenih committed Jul 24, 2024
1 parent 9781191 commit 4eeca56
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/main/java/org/spin/report_engine/data/ReportInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,19 @@ private void processChildren(Row parent, int levelAsInt) {
if(nextLevel < groupLevels.size()) {
children.forEach(child -> processChildren(child, nextLevel));
} else {
rows.stream().filter(row -> {
return row.getLevel() > previosLevelGroup.getSortSequence() && compareRows(parent, row, nextLevel);
}).forEach(row -> children.add(row));
children.forEach(child -> processAllChildren(child));
}
}

private void processAllChildren(Row parent) {
List<Row> children = parent.getChildren();
PrintFormatItem previosLevelGroup = groupLevels.get(groupLevels.size() - 1);
if(previosLevelGroup == null) {
return;
}
rows.stream().filter(row -> {
return row.getLevel() > parent.getLevel() && compareRows(parent, row, groupLevels.size() - 1);
}).forEach(row -> children.add(row));
}

private boolean compareRows(Row parent, Row child, int currentLevel) {
Expand Down

0 comments on commit 4eeca56

Please sign in to comment.