我基本上是在尝试做这个问题中提出的问题:
在 Reporting Services 中为单个参数传递多个值
但这对我不起作用。
我的参数的数据类型为text
. 我有一种感觉,当我的参数被插入到我的查询中时,它被引号包围了。
询问
SELECT
AllUserData.tp_ID, Title as TestSite, tp_Title as TestCase, nvarchar6 as ItemNumber,
nvarchar7 as DefectType, nvarchar8 as Status, nvarchar9 as QuestionID,
ntext2 as Question, AllUserData.tp_Version as Version,
CONVERT(VARCHAR(10), AllUserData.tp_Modified, 111) AS DateModified
FROM
[dbTOG].[dbo].[AllUserData]
INNER JOIN
dbTOG.dbo.AllLists on dbTOG.dbo.AllUserData.tp_ListId = dbTOG.dbo.AllLists.tp_ID
INNER JOIN
dbTOG.dbo.Webs on dbTOG.dbo.AllLists.tp_WebId = dbTOG.dbo.Webs.Id
WHERE
(nvarchar8 = 'PASS' OR
nvarchar8 = 'FAIL' OR
nvarchar8 = 'N/A' OR
nvarchar8 = 'TBD' OR
nvarchar8 = 'TBRT' OR
nvarchar8 = 'FIXED')
AND Title = @TestSite
AND tp_Title IN (@TestCase)
@TestCase 的参数表达式
=Join(Parameters!TestCase.Value, ",")