我有一个报表查看器控件,如下所示:
<rsweb:ReportViewer ID="ReportViewer1" style="margin-bottom:78px;" runat="server"
AsyncRendering="true" SizeToReportContent="true" Width="100%" Height="100%"
KeepSessionAlive="true"></rsweb:ReportViewer>
并在C#代码中更改了以下两个属性:
ReportViewer1.ServerReport.Timeout = Int32.MaxValue;
ReportViewer1.ProcessingMode = ProcessingMode.Remote;
问题是报告查看器开始正常加载并在大约一分钟左右后随机停止。现在,在尝试加载的报告中,从OLAP多维数据集(大约100,000行)中检索了大量数据。它与SSRS中的展开/折叠功能组合在一起。当我从报告中过滤数据时,它会正常加载。报告也会在Visual Studio 2012中正常加载ReportManager(需要几分钟,但加载)。
所以我的问题是:对于ReportViewer Control来说渲染是否过多或者我遗漏了什么?
修改:
将其归入SSRS的原因是因为我绝不是MDX的专家。我使用的MDX查询是SSRS自动生成的查询。生成了MDX查询(更改了列,维度和度量的名称):
SELECT NON EMPTY { [Measures].[Column1], [Measures].[Column2],
[Measures].[Column3], [Measures].[Column4],
[Measures].[Column5], [Measures].[Column6],
[Measures].[Column7] } ON COLUMNS,
NON EMPTY { ([Dimension1].[Value1].[Value1].ALLMEMBERS *
[Dimension2].[Value2].[Value2].ALLMEMBERS *
[Dimension2].[Value3].[Value3].ALLMEMBERS *
[TimeDimension].[Value4].[Value4].ALLMEMBERS *
[Dimension2].[Value5].[Value5].ALLMEMBERS ) }
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM
( SELECT ( STRTOSET(@DateParameter, CONSTRAINED) ) ON COLUMNS FROM [Monthly])
WHERE ( IIF( STRTOSET(@DateParameter, CONSTRAINED).Count = 1,
STRTOSET(@DateParameter, CONSTRAINED), [TimeDimension].[Value].currentmember ) )
CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING,
FONT_NAME, FONT_SIZE, FONT_FLAGS
按
分组[Dimension1].[Value1].[Value1]
和
[Dimension2].[Value2].[Value2]
在SSRS中
提前致谢。
答案 0 :(得分:2)
您可能在ASP中遇到超时:
ReportViewer timeouts in spite of timeout settings
我实际上正在处理类似的问题。我找到的唯一真正的解决方案(除了上面的链接,因此等待报告呈现)是:
我会尝试使用reportserver reportviewer运行报告,并将报告的超时设置为0,以获得报告运行时间的基线。
然后,运行以下查询:
use ReportServer
SELECT els.UserName
, c.Name Report
, els.Parameters
, els.Status
, els.Format
,els.TimeStart
,els.TimeEnd
, CAST(FLOOR(DATEDIFF(SECOND,TimeStart, TimeEnd)/60.0) as varchar(100)) + ''' ' + CAST(ABS( 60 * FLOOR(DATEDIFF(SECOND,TimeStart, TimeEnd)/60.0) - DATEDIFF(SECOND,TimeStart, TimeEnd)) as varchar(100)) + '"' TotalTime
,CAST(FLOOR(TimeDataRetrieval/1000.0/60.0) as varchar(100)) + ''' ' + CAST(ABS(Floor(TimeDataRetrieval/1000.0/60.0)*60 - TimeDataRetrieval/1000) as varchar(100)) + '"' Data
, CAST(FLOOR(TimeProcessing/1000.0/60.0) as varchar(100)) + ''' ' + CAST(ABS(Floor(TimeProcessing/1000.0/60.0)*60 - TimeProcessing/1000) as varchar(100)) + '"' Processing
, CAST(FLOOR(TimeRendering/1000.0/60.0) as varchar(100)) + ''' ' + CAST(ABS(Floor(TimeRendering/1000.0/60.0)*60 - TimeRendering/1000) as varchar(100)) + '"' Rendering
, els.[RowCount]
, CAST(ROUND(CAST([RowCount] as decimal) / (CASE WHEN TimeDataRetrieval = 0.00 THEN NULL ELSE TimeDataRetrieval END /1000),2) as decimal(18,1)) RowsPerSecond
FROM ExecutionLogStorage els
LEFT JOIN Catalog c on c.ItemID = els.ReportID
WHERE c.Name IN( '<<REPORT NAME>>') AND
Format = 'RPL' AND
Status ='rsSuccess' AND
1=1
ORDER BY TimeEnd DESC
查看您的报告花费的时间最多。
另外,您介意提供MDX查询吗?您返回100k行然后将它们分组到SSRS中似乎很奇怪。让MDX进行分组/汇总并以计算出的度量进行计算,然后将其提供给报告,这通常是更好的做法。