Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

SSRS 2005 - How to pass a Blank report parameter value to a stored procedure?

$
0
0

I have an SSRS 2005 report setup with a parameter called @Status. This parameter looks at a dataset for its values. The dataset for the parameter is based on the following query:

SELECT     HIERARCHY.NAME, HIERARCHY.DESCRIPTION, DATAAREA.ID
FROM         DATAAREA INNER JOIN
                      HIERARCHY ON DATAAREA.ID = HIERARCHY.DATAAREAID
WHERE     (DATAAREA.ID IN (@CompanyID)) AND (HIERARCHY.ISTEMPLATE = 1) AND 
(HIERARCHY.NAME IN ('01 - TBQ', '02 - Quoted')) UNION SELECT '' AS Name, '(Blank)' AS Description, @CompanyID AS ID ORDER BY HIERARCHY.NAME

The applicable SQL from the stored procedure is as follows. The parameter is only referenced in a WHERE statement in the stored procedure, so I have excluded the rest of the stored procedure below as I dont believe its relevant?

create proc [dbo].[Sales_In_Progress]
@Status nvarchar (50)

SET @Status = Char(44) + @Status + Char(44)

WHERE     (@Status Like '%,' + SMMOPPORTUNITYTABLE.PROCESSNAME + ',%')

Is there anything obvious I am doing wrong in the above? I have used Blank values in SSRS report queries fine before, but never in a stored procedure. How can I get the Blank value to pass to the stored procedure? All of the correct records are being returned at the moment, except the ones with a Blank Status. Please help!

Cheers
Naz


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>