Hi,
Are Class & Roll defined as dimensions? if not create a dimension variable for them.
If this was the case you can unflag in format table: Avoid duplicate row aggregation.
If this was not the case.
then create verticle table add your objects, create break on Name, manage break > unflag break header, flag break footer and apply sort (display first), put dimensions in footerline and sum([amount] for your measure. Go to format table and flag show table headers. Go to Analysis >> interact >> outline and you can fold unfold, the way you want.
Hoping I could help you
Grtz
Koen