Report question

Question: Creating dynamic queries depending on parameter passed in rails 3