較之Table Control,Matrix Control要設定資料列背景色得多費些工夫。

Step 1.  首先,於Rows欄位中右鍵點取[Insert Group]

 

 

Step 2.  在Group on中給予Expression,像 =1

 

 

Step 3. 

  • >> 給予此新增欄位名字,如Color。
  • >> 設定此欄位的BackgroundColor, Color的值為 =Value
  • >> 將其值(Value或Expression)的內容改為如:=iif(RunningValue(Fields!Items.Value,CountDistinct,Nothing) Mod 2, "LightGrey", "White"),其中 Items.Value請改為Rows欄位的內容
  • >> 再來請設定此欄位的邊界線(左邊界不設線)

 

Step 4.  資料欄位的BackgroundColor的Expression則改為如:=ReportItems!Color.Value (Color即Step2中,我們更改該欄的名稱)

 

 

Step 5. Rows欄位的背景色設定如:=iif(RunningValue(Fields!Items.Value,CountDistinct,Nothing) Mod 2, "LightGrey", "White") 

 

 

 

參考來源:Chris Hays's Reporting Services Sleazy Hacks Weblog

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 bagwant 的頭像
    bagwant

    Bag Want

    bagwant 發表在 痞客邦 留言(0) 人氣()