Here's a solution - that took some time !
But I didn't manage to print the summary in numeric order. I used an Order By clause, which almost produced numeric order, but I had to UNION in a totals row, and the UNION engine messed up the numeric order. Maybe someone else can help with that part...