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.
Author |
Topic |
jassie
Constraint Violating Yak Guru
332 Posts |
Posted - 2013-10-15 : 18:13:03
|
In a SSRS 2008 r2 existing report, I am trying to add a new paramerter to the report called @GRADE. Currently the report runs based upon @Course. Now I want to run the report based upon if the @Course or @GRADE parameteris selected. Depending which parameter is selected, I want to generate the report in that manner. The following is a small snapshot of the code in the dataset.IF @Course IS NOT NULL WITH Ctudent AS ( SELECT BCourseSK FROM DataStore.dbo.vwBr WHERE BCourseSK = @Course )ELSE IF @GRADE IS NOT NULL WITH Btudent AS ( SELECT [grade] FROM [DataStore].[dbo].[vwBr] WHERE grade = @GRADE )Basically either @Course or @GRADE parameter is selected but not both. For this to occur,I have set the default value for these paramters to be null. From what I have seen on the internet, setting the default paramter value to null is the same as setting the parameter as an optional value.My problem is the way I set the default parameter values to NULL. The query will not pick any valueswhen the report is executed.(When run the sql in SSIS manager, the sql is working).Thus can you tell me what you recommend I do so that the query runs and picks records? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|