I need to switch between 2 queries in SSRS Reporting Services, from same report. Queries have same column data, differences are only in group by clauses. I have created a boolean parameter which should decide what query should be executed, but I can't get in to work in Dataset Query designer. Can somebody explain what I should do to make It work?
How I did so far (in Dataset Query designer):
if @chooseSelect = 1
SELECT FROM....
group by...
else
SELECT FROM...
This returns me errors "Query execution failed for Dataset" & "Invalid SQL statement"