Rakesh,
You could have these rows in the cursor and control their visibility via a SET FILTER.
>in excel there is an option to subtotal , is it possible to do something similar by maybe hiding certain rows which contain subtotals and totals and making them visible on a click, or anything similar, any ideas?