SSRS null in prompt
hi
i create a report in SSRS.. in that report i want to send promt..so my dataset2 will give prompt values
so my prompt value is 2 values one is null another one will contain value
if i used this 2nd value in promt that value related data i il get
but i passed 1st prompt null related value i didnt get how to pass null as promt,i choosed allowed null in parameter properties also
May 26th, 2012 5:23am
Hi there
If I understand you correctly you would like to pass the null value as a parameter to the dataset and would like to return the value.
I am putting an example here. For example I have created a aparameter with two available values one is ABC and one is null and I have given a label of All to null values.
And I would like to select all value from my dataset when I pass null values otherwise just the value which I have pass so I have write query like this
SELECT [TestCase]
,[Step1]
,[PassStatus]
FROM [dbo].[TestCase]
where
[TestCase]=isnull(@Test2, [TestCase])
This mean when I pass @Test2 parameter as null it will bring all values because testcase column will be mapped with testcase.
I am putting some screenshot for your help
If you have any questions please do ask.
ManyThanks
Syed Qazafi Anjum
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful
SELECT [TestCase]
,[Step1]
,[PassStatus]
FROM [dbo].[TestCase]
where
[TestCase]=isnull(@Test2, [TestCase])
Free Windows Admin Tool Kit Click here and download it now
May 26th, 2012 6:56am
Ya thanks for ur reply
i want to Explain my scenario clearly now
in my data set i am having value i like this
Name Email Address
John
Smith Smith.sf@sf.com
Keen ken23.34@we.com
in my promt i want to send email Address..so in that prompt i choose null means i want to show John name as result
If i used ur Quary like
where
[TestCase]=isnull(@Test2, [TestCase])
i will get Smith and keen
May 26th, 2012 7:41am
Hi There
if that is the case then please change the query like this
IF @Test2 IS NULL
SELECT [TestCase]
,[Step1]
,[PassStatus]
FROM [dbo].[TestCase]
where
[TestCase] is null
else
SELECT [TestCase]
,[Step1]
,[PassStatus]
FROM [dbo].[TestCase]
where
[TestCase]=@Test2
If you have any questions please do ask.
ManyThanks
Syed Qazafi Anjum
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful
IF @Test2 IS NULL
SELECT [TestCase]
,[Step1]
,[PassStatus]
FROM [dbo].[TestCase]
where
[TestCase] is null
else
SELECT [TestCase]
,[Step1]
,[PassStatus]
FROM [dbo].[TestCase]
where
[TestCase]=@Test2
Free Windows Admin Tool Kit Click here and download it now
May 26th, 2012 7:57am
Hi There
if that is the case then please change the query like this
IF @Test2 IS NULL
SELECT [TestCase]
,[Step1]
,[PassStatus]
FROM [dbo].[TestCase]
where
[TestCase] is null
else
SELECT [TestCase]
,[Step1]
,[PassStatus]
FROM [dbo].[TestCase]
where
[TestCase]=@Test2
If you have any questions please do ask.
ManyThanks
Syed Qazafi Anjum
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful
IF @Test2 IS NULL
SELECT [TestCase]
,[Step1]
,[PassStatus]
FROM [dbo].[TestCase]
where
[TestCase] is null
else
SELECT [TestCase]
,[Step1]
,[PassStatus]
FROM [dbo].[TestCase]
where
[TestCase]=@Test2
May 27th, 2012 9:00pm


