I want to pass paramter from Forms to report ie if i Select Department from forms list box the report should run Group by Department wise

If i Select Location from forms list box the report should run Group by Location wise.

I want to confirm wheather it is possible to change the layout at runtime.If So Pl help me how to do this.

Regards
mat123