Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

An expression of non-boolean type specified in a context where a condition is expected, near ','

$
0
0
I am getting the error message, "An expression of non-boolean type specified in a context where a condition is expected, near ',' "when running an ssrs 2008 r2 report.The sql embedded in the dataset is:IF @reportID <> 0BEGIN SELECT 'Students report 1' AS selectRptName, 1 AS rptNumValue UNION SELECT 'Students report 2', 2 UNION SELECT 'Students report 3', 3 UNION SELECT 'Students report 4', 4 UNION SELECT 'Students report 5', 5 ORDER BY selectRptNameEND)The sql runs fine in managment studio when I declare @reportID.The sql runs fine with I comment out 'IF @reportID <> 0'.The @reportID is a parmeter value that is passed to the applicable dataset. The @reportID can have more than one value.Thus can you show me sql and/or tell me what I need to do to solve the issue for me?

Viewing all articles
Browse latest Browse all 2791

Trending Articles