【表達式】
1. 截斷
=IIf(Len(Fields!CoursewareName.Value)>10,Left(Fields!CoursewareName.Value,10),Fields!CoursewareName.Value)
2.隔行換色
=Iif(RowNumber(Nothing) Mod 2, "#fffbe9", "White")
3.轉(zhuǎn)換你的數(shù)字為文本
=Code.ExpandPrice(Fields!Amount.Value,".")
4.提取這個IP地址或服務器名稱
=Mid(Globals!ReportServerUrl,8,InStr(9,Globals!ReportServerUrl,"/")-8)
5.假設你想每頁顯示20行,那么添加一個組到你的報表中,它具有以下表達式,組選擇page break at the end選項
=int((RowNumber(Nothing)-1)/20)
6.實現(xiàn):值的結構百分比的表達式:
Value=iif(Sum(Fields!ED.Value, "projectname")=0,0,Sum(Fields!ED.Value)/Sum(Fields!ED.Value, "projectname"))
7.實現(xiàn):當值為0時不顯示(白色),當小于0時為紅色,否則為黑色。
Color=iif(Sum(Fields!ED.Value)=0,"white",iif(Sum(Fields!ED.Value)<0,"red","black"))
8.:設置行號 RowNumber
設置需要展示行號的單元格的表達式內(nèi)容為:=RowNumber(nothing),注意:nothing 表示數(shù)據(jù)集或組,這里的nothing是數(shù)據(jù)集的默認值。
【報表URL】
報表 URL 包含 Web 服務器的名稱、報表服務器虛擬目錄的名稱以及報表的完全限定名稱。(完全限定的名稱包含報表路徑,并以報表本身的
名稱結束。)
例如:http://server/virtualroot?%5B/pathinfo%5D&prefix:param=value%5B&prefix:param=value%5D...n]
常用前綴及其參數(shù)名:
1. rc:toolbar=true/false 顯示/不顯示工具欄
2. rs:command=render 呈現(xiàn)報表
3. rs:format=PDF(DOC,XLS)導出報表格式
4. rc:parameters=true/false 顯示/不顯示工具欄的參數(shù)選擇區(qū)域
5. @Parameter=value 直接傳遞參數(shù)值