Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 ssrs 2012 setup parmeter value

Author  Topic 

jassie
Constraint Violating Yak Guru

332 Posts

Posted - 2015-04-22 : 12:17:57
In an existing ssrs 2012 report, I want to basically add the following logic to a new dataset that will be used by a new parameter called 'Inventory'.
SELECT DISTINCT Inv_number as value, Inv_name as label
FROM s.dbo.fnUser( @endYear, 0, 0, 0)
WHERE (@report is not null)
order by label,value

In this ssrs report, there are 15 reports that can automatically be generated. I basically want this new parameter called 'Inventory' to only be active
when the 4th report is selected to be generated. Thus in the query I listed above, how can I change the query to only be active when the 4th report is selected?

I tried to change the where clause to (@report(4) is not null), but that did not work. Thus can you show me the sql I can use to accomplish my goal?
   

- Advertisement -