page1 Reportpage1 DataBand1 TextItem1 DataBand1 $D{test.first} TextItem4 DataBand1 $D{test.summ} TextItem2 DataBand1 $D{test.sec} Reportpage1 test GroupBandHeader4 TextItem5 GroupBandHeader4 Start first $D{test.first} Reportpage1 DataBand1 first GroupBandFooter4 TextItem62 GroupBandFooter4 $S{SUM("$D{test.summ}", "DataBand1")} TextItem65 GroupBandFooter4 End first $D{test.first} Reportpage1 GroupBandHeader4 DataHeaderBand1 TextItem3 DataHeaderBand1 sec TextItem6 DataHeaderBand1 summ TextItem7 DataHeaderBand1 first Reportpage1 DataBand1 datasources db QSQLITE ./db.sqlite3 test SELECT first, sec, SUM(summ) AS summ FROM test_table GROUP BY first, sec ORDER BY first, sec db