SSRS 2014:report参数具有DefaultValue或ValidValue,它取决于report参数。前向依赖项无效

时间:2016-05-20 19:22:05

标签: sql-server reporting-services business-intelligence ssrs-2014

在谷歌尝试了很多,我运气不好,在这里,我正在寻求你的帮助。我正在尝试使用存储过程在SSRS中创建数据集,我很难过。有人可以告诉我我失踪的事情吗?

以下是我的存储过程的样子:

    CREATE PROCEDURE [dbo].[usp_GetUserData](@ReportRunDate DATE        = NULL,
                                         @ReportName    VARCHAR(50) = NULL)
AS
     BEGIN
         WITH CTE
              AS (SELECT [USER_ID], [Name], [Address], [DOB], [Status], [UserType], [DateAdded]
                  FROM [dbo].[User_Information]
               WHERE [DateAdded] = @ReportRunDate)
              SELECT *
              INTO #UserReport
              FROM CTE;
         IF(@ReportName = 'Internal')
             BEGIN
                 SELECT [USER_ID], [Name], [Address], [DOB]
                 FROM #InternalReport
                 WHERE [UserType] = 'Internal';
                 SELECT *
                 FROM #InternalReport;
             END;
         IF(@ReportName = 'External')
             BEGIN
                 SELECT [Name],[Status]
                 FROM #ExternalReport
                 WHERE [UserType] = 'External';
                 SELECT *
                 FROM #ExternalReport;
             END;
     END;

我改变了许多人在SO中提到的参数顺序,但这也没有帮助。

0 个答案:

没有答案