Constraint Violating Yak Guru
Posted - 10/15/2013 : 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 parameter
is 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 (
BCourseSK = @Course
ELSE IF @GRADE IS NOT NULL
WITH Btudent AS (
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 values
when 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?