You'll want to look in Books Online (SQL Server's help files) and search for things relating to SSRS making use of Parameters, and perhaps a matrix (if using 2005) or tablix (if using 2008).
Basically you create a dataset which accept parameters to help you modify the where clause. You set up parameters in your report properties.
Then you can group by the data returned by the data set in a variety of ways, again google and BOL are your friend here.
-Luke.
To help us help you read this[/url]For better help with performance problems please read this[/url]