SSRS常见问题详解(一)
以下文章只是列出平常开发遇到常见问题,具体安装部署问题可以访问MSDN都有详细的解决方案。
1、分页页数出面? 乱码
在 SSRS ReportView 控件属性PageCountMode 默认属性页数设置"Estimate"估计页数才导致页数后面出现?,应设置成 “Actual” 实际页数。
2、 在新窗口打开
根据以下路径,找到安装报表发布服务器程序。如下:C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\Pages\ReportViewer.aspx
打开ReportViewer.aspx页面,在ReportViewerControl中增加属性代码HyperlinkTarget="_blank" 。
<RS:ReportViewerHost ID="ReportViewerControl" runat="server" HyperlinkTarget="_blank" />
3、页面加载用户之前延迟设置
访问SSRS 报表加载慢的问题,用户可以调整 WaitControlDisplayAfter="1000" 属性。
4、报表显示行号
=RowNumber("DataSet1")
5、表格行交替背景色
在报表<属性>中,选择<backgroundColor>
=IIF(RowNumber("DataSet1") Mod 2, "White", "LightYellow")
6、日期参数使用技巧
根据上个月的21号到本月的20号。因此要求我提供的两个参数,开始日期和结束日期的默认值就是这两个日期。
开始日期=cdate(format(dateadd(dateinterval.month,-1, Globals!ExecutionTime ),"yyyy-MM-21"))
结束日期=cdate( format(Globals!ExecutionTime,"yyyy-MM-20"))

浙公网安备 33010602011771号