SSRS2008-Reporting Service Tips

来源:互联网 发布:千里眼被淘宝屏蔽 编辑:程序博客网 时间:2024/06/11 13:45

----要点击两次查看报表按钮才能开始运行报表。

这个问题主要是参数的默认值是时间日期的动态表达式,如date这个参数的默认值是today().

解决方法可以使吧date这个参数设置成hidden不可见的。或者把date这个参数的默认值设置为空。 当使用参数的默认值为动态的时候,就得注意参数间的依赖性和独立性。

http://connect.microsoft.com/SQLServer/feedback/details/634456/ssrs-click-view-report-twice-after-change-a-date-parameter


--SSRS 2008 每次重选参数后 ,参数会自动全部刷新。

原因是参数中有使用表达式作为参数的默认值,或者参数引用的dataset中有calculate field,而这个calculate field刚好被用作参数的值。

如果是字符串或者是数字,可以直接填数字或者字符串,而不是=“dfdf” 或者=12.这样SSRS会把它作为表达式对待。

如果是动态的,可以创建一个dummy dataset,然后再dataset中进行处理。

hidden或者internal的参数中使用了表达式不会造成上述影响。


--SSRS 2008  不固定表头,各个页面表头重复显示

点击列组(Column Groups)边上的箭头,弹出“高级模式”,然后点击“高级模式”,然后点击左边行组中的(静态),然后在右边的属性中设置FixedData为true,KeepTogether=True,KeepWithGroup=After,RepeatOnNewPage=True.就可以了。如果只设置FixedData为true,那么只有首页滚动时表头会跟随滚动。


 -----ssrs2005 创建报表模板

新建一个普通报表,调整好布局,保存,将该报表的rdl文件拷贝到以下路径中,当你要添加新报表是右键Add>New Item 就可以看得到你的模板了。


C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject\

http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/4bd1d195-42bb-4eed-975f-552fd1013be7


-----命名Excel中的Sheet名字, Naming Excel Worksheets

http://blogs.msdn.com/b/robertbruckner/archive/2010/05/16/report-design-naming-excel-worksheets.aspx

Page Breaks,PageName.


 -----SSRS 设置一致表格行高行宽,Set table/Matrix same size,same height,same width

 

Create a textbox A in your matrix/table(not in thematrix/table) report. Select the matrix/table, press the button “Ctrl”, and then select the textbox A. Right click on the textbox A, select Layout-->Make same height/width, you will find it works now.

---- SSRS 控制展开或合并的图标, +/-.

选中toggleitem,设置其属性InitialToggleState,True 是collapse(+) False 是 Expanded(-)

http://msdn.microsoft.com/zh-SG/library/aa337391%28v=sql.90%29


 -----SSRS 自定义报表样式,table style,StyleTemplate

The file used for the style templates is at C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\Business Intelligence Wizards\Reports\Styles\en\StyleTemplates.xml in my installation of BIDS.

StyleTemplates tag: http://www.developmentnow.com/g/115_2004_10_0_0_451790/Styletemplates-xml-tags.htm

Example:

<StyleTemplate Name="ORTheme"><Label>ORTheme</Label><Styles><Style Name="Title"><FontFamily>Verdana</FontFamily><FontSize>20pt</FontSize><Color>SteelBlue</Color><FontWeight>Bold</FontWeight></Style> <Style Name="Page Group Level 1"><FontFamily>Verdana</FontFamily><FontSize>14pt</FontSize><Color>SlateGray</Color>            </Style> <Style Name="Page Group Level 2"><FontFamily>Verdana</FontFamily><FontSize>12pt</FontSize></Style><Style Name="Page Group Level 3+"><FontFamily>Verdana</FontFamily><FontSize>10pt</FontSize></Style><Style Name="Table"><BorderStyle><Default>Solid</Default></BorderStyle><BorderColor><Default>#0099ff</Default></BorderColor></Style><Style Name="Matrix"></Style><Style Name="Table Header"><BackgroundColor>White</BackgroundColor><VerticalAlign>Middle</VerticalAlign><FontFamily>Verdana</FontFamily><FontSize>7pt</FontSize><FontWeight>Bold</FontWeight><Color>Black</Color><BorderStyle><Default>None</Default><Bottom>Solid</Bottom></BorderStyle>                <BorderColor><Default>#0099ff</Default><Bottom>#0099ff</Bottom></BorderColor><BorderWidth><Default>1pt</Default><Bottom>1.5pt</Bottom></BorderWidth>  </Style><Style Name="Group Level 1"><FontFamily>Verdana</FontFamily><FontSize>7pt</FontSize><FontWeight>Bold</FontWeight><Color>White</Color><BackgroundColor>#6e9eca</BackgroundColor><BorderStyle><Default>Solid</Default></BorderStyle>                <BorderColor><Default>LightGrey</Default></BorderColor></Style> <Style Name="Group Level 1 Textbox"><FontFamily>Verdana</FontFamily><FontSize>7pt</FontSize><FontWeight>Bold</FontWeight><Color>White</Color><BackgroundColor>#6e9eca</BackgroundColor><BorderStyle><Default>Solid</Default></BorderStyle>                <BorderColor><Default>LightGrey</Default></BorderColor></Style> <Style Name="Group Level 2"><Color>White</Color><FontFamily>Verdana</FontFamily><FontSize>7pt</FontSize><FontWeight>Bold</FontWeight><BackgroundColor>SlateGray</BackgroundColor><BorderStyle><Default>Solid</Default></BorderStyle>                <BorderColor><Default>LightGrey</Default></BorderColor></Style> <Style Name="Group Level 2 Textbox"><Color>White</Color><FontFamily>Verdana</FontFamily><FontSize>7pt</FontSize><FontWeight>Bold</FontWeight><BackgroundColor>SlateGray</BackgroundColor><BorderStyle><Default>Solid</Default></BorderStyle>                <BorderColor><Default>LightGrey</Default></BorderColor></Style> <Style Name="Group Level 3+"><Color>White</Color><FontFamily>Verdana</FontFamily><FontSize>7pt</FontSize><FontWeight>Bold</FontWeight><BackgroundColor>#8fa0b0</BackgroundColor><BorderStyle><Default>Solid</Default></BorderStyle>                <BorderColor><Default>LightGrey</Default></BorderColor></Style> <Style Name="Group Level 3+ Textbox"><Color>White</Color><FontFamily>Verdana</FontFamily><FontSize>7pt</FontSize><FontWeight>Bold</FontWeight><BackgroundColor>#8fa0b0</BackgroundColor><BorderStyle><Default>Solid</Default></BorderStyle>                <BorderColor><Default>LightGrey</Default></BorderColor></Style> <Style Name="Detail"><FontFamily>Verdana</FontFamily><FontSize>7pt</FontSize><BorderStyle><Default>None</Default></BorderStyle>                <BorderColor><Default>LightGrey</Default></BorderColor></Style>         </Styles>    </StyleTemplate>




原创粉丝点击