SQL Report Services 2000. Problem with Advance Parameters and Unions
Posted on 2004-10-19
I am trying to solve a problem that I am having in the AdventureWorks DB in SQL. In SQL Reporting Services 2000, I can have a parameter setup so it can display 'All Categories' from a dropdown list. I am trying to create this in my own database. The problem I think I get is that the Category query from AdventureWorks comes from its own table. My Category is divised from the same table as the DataDetail therefore the UNION will be screwed up. How do I create the same situation from AdventureWorks into my database if both queries are coming from the same source? See code for AdventureWorks query below.
WHERE (CategoryKey = @Category) OR
(@Category = - 1)
SELECT DISTINCT ProductCategoryKey AS CategoryKey, ProductCategoryName AS Category
SELECT - 1, 'All Categories'