简体   繁体   English

SSRS 2012-错误:无法显示子报表

[英]SSRS 2012 - Error: Subreport could not be shown

I'm using Visual Studio 2012 and my queries come from SQL Server 2012. 我正在使用Visual Studio 2012,而我的查询来自SQL Server 2012。

I currently have 5 reports that I am trying to bring into 1 main executive dashboard using subreports. 我目前有5个报告,我正在尝试使用子报告将其纳入1个主要执行人员仪表板。

On my main executive dashboard, I add an initial subreport to the canvas in order to bring in one of the reports (Report1.rdl). 在我的主要执行仪表板上,我向画布添加了一个初始子报表,以引入其中一个报表(Report1.rdl)。 When I right-click and go to Subreport Properties, under the general tab under "Use this report as subreport", I click and select Report1. 当我右键单击并转到“子报表属性”时,在“使用此报表作为子报表”下的常规选项卡下,单击并选择Report1。 I don't change anything underneath the Visibility or Border tabs. 我在“可见性”或“边框”选项卡下没有任何更改。 Under the Parameter tabs, I add these 4 parameters to run the sub report: StartDate, Rush, EndDate and Group using the format Name = StartDate, Value = @StartDate (and so on for the other 4 parameters.) 在“参数”选项卡下,我添加以下4个参数以运行子报表:StartDate,Rush,EndDate和Group,其格式为Name = StartDate,Value = @StartDate(其他4个参数依此类推。)

When I click OK, it says on the screen Report1 inside the Subreport grayed out box. 当我单击“确定”时,它在屏幕上的“报表1”中显示为“子报表”灰色框。 When I try to preview the project, the 4 parameters show up at the top and are working, but the canvas shows "Error: Subreport could not be shown" where the subreport should be. 当我尝试预览项目时,4个参数显示在顶部,并且可以正常工作,但是画布在子报表应显示的位置显示“错误:无法显示子报表”。

For the executive dashboard report, I recreated the same 4 parameters on it that are on all my other 5 reports (StartDate, Rush, EndDate, Group.) 对于执行人员仪表板报告,我在其上重新创建了与其他所有5个报告(StartDate,Rush,EndDate,Group)相同的4个参数。

Rush and Group are based off of two separate datasets using a simple query to populate. Rush和Group基于两个单独的数据集,使用简单的查询进行填充。

SELECT  DISTINCT [RUSH]
FROM        TableA

SELECT  DISTINCT  [GROUP]
FROM        TableA
WHERE       [TEAM] = 'TeamA'

StartDate and EndDate are both Date/Time Data type parameters. StartDate和EndDate都是日期/时间数据类型参数。

Under default values I specified the values for StartDate with the following expression: =DateAdd("d",-(Day(today)-1), Today) (to show 1st day of Current Month). 在默认值下,我使用以下表达式指定StartDate的值:= DateAdd(“ d”,-(Day(today)-1),Today)(显示当前月的第一天)。

Under default values I specified the values for EndDate with the following expression: =DateSerial(Year(Now()), Month(Now()), "1").AddMonths(1).AddDays(-1) (to show last day of current month.) 在默认值下,我使用以下表达式指定EndDate的值:= DateSerial(Year(Now()),Month(Now()),“ 1”)。AddMonths(1).AddDays(-1)(显示最后一个)当月的一天。)

The executive dashboard report also has its own Data Source MainDashboardDS which is based off DataSource1, a shared data source reference. 执行仪表盘报告还具有自己的数据源MainDashboardDS,它基于共享数据源引用DataSource1。

Anyways, I tried listing out everything I can think of above that may help with figuring out my problem...but my main question is, what am I doing wrong that I am getting this Error that my Subreport cannot be shown? 无论如何,我试图列出上面我能想到的所有可能有助于解决我的问题的方法...但是我的主要问题是,我得到了无法显示我的子报表的错误,我做错了什么?

在值字段中...我需要参数在方括号中包含值,例如[@Group] ...等...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM