Adrien Blaizot
Adrien Blaizot

Reputation: 47

Add "- All" as default parameter in my SSRS binary parameter

I have some parameter in a SSRS. I add a "- All" parameter as default value in all of them. For one parameter, a binary one, this cause this error :

  • Syntax error converting the nvarchar value '- All' to a column of data type bit.

Here is my Query :

SELECT mValue.value AS V
FROM FROM SERVER.DB.dbo.table mValue
UNION
SELECT '- All' 
FROM SERVER.DB.dbo.table mValue

I need to get 3 choices in my selector : - All, True, False

Here's my correction, Thank's to the help :

SELECT CONVERT(VARCHAR, mValue.value) AS V
FROM FROM SERVER.DB.dbo.table mValue
UNION
SELECT '- All' 
FROM SERVER.DB.dbo.table mValue

Upvotes: 1

Views: 173

Answers (1)

Aldrin
Aldrin

Reputation: 766

Then you should change the parameter type into String instead.

Upvotes: 2

Related Questions