参数不会过滤报告 SSRS

Parameter wont filter report SSRS

出于某种原因,我的参数不会根据我的报告进行过滤。我有 2 个不同 table 的 3 个数据集。一个数据集是 Project,一个是 Issue,最后一个是参数将引用的数据集,用于名为 SelectProject 的值并添加了以下值:

SELECT DISTINCT ProjectName, ID
FROM            Project

参数名称是:SelectProject。

我的项目数据集如下所示:

SELECT        Project.ProjectCode, Project.ProjectName, 
              Project.ProjectDescription, Project.ID, ProjectSponsorIDText, 
FROM            Project
WHERE        (Project.ID IN (@SelectProject))

问题出在我的问题数据集上。

SELECT        Issue.IssueName, Issue.ID, Issue.RelatedRisk, 
              Issue.Project, Issue.RaisedBy, Issue.Description, 
              Issue.Impact, Issue.ImpactDescription
FROM            Issue 
INNER JOIN
                         Project ON Issue.ID=Project.ID
WHERE        (Project.ID IN (@SelectProject))

出于某种原因,它没有根据 table 过滤我的问题,只是让我空着 table。 有什么我想念的吗?

您应该使用 Issue.Project 字段加入您的问题:

SELECT        Issue.IssueName, Issue.ID, Issue.RelatedRisk, 
              Issue.Project, Issue.RaisedBy, Issue.Description, 
              Issue.Impact, Issue.ImpactDescription
FROM            Issue 
INNER JOIN Project ON Issue.Project = Project.ID
WHERE         Project.ID = @SelectProject