Reporting Services技巧(二) 實現對KPI的支援

來源:互聯網
上載者:User

Analysis Services 2005的一個新增功能是KPI,然而這種功能在Reporting Services 2005中卻無法使用,也就是說,Reporting Services 2005無法讀取Analysis Services的KPI,這裡提供兩種解決辦法:

1.通過Report Builder

我們可以在Report Builder中建立報表,可以直接讀取Analysis Services中已經設定好的KPI,由於Report Builder的報表設計功能有限,所以我們可以將已經添加好KPI的報表儲存起來,再利用開發環境開啟進行其他設定,增加其他功能。

缺點是我們無法對KPI的表徵圖進行設定。

2.利用自訂代碼

在開發環境中,我們同樣可以利用自訂代碼來完成對KPI的讀取。

首先我們需要將所需的KPI表徵圖讀取到報表中,這樣我們可以在報表裡面利用這些表徵圖,也可以將其讀取到項目中,這樣,項目中所有的報表都可以利用這些表徵圖。

接下來我們設定如下的代碼:

Public Function GetKPI(ByVal currentValue As Integer,ByVal type As String) As String

Select currentValue

Case 1

Return type &"2"

Case 0

Return type &"1"

Case -1

Return type &"0"

End Select

End Function

自訂函數通過從Cube中讀取的狀態和趨勢值,在映像的屬性Value中設定

=code.GetFace(Fields!Product_Gross_Profit_Margin_狀態_.Value,"cyl")

來擷取表徵圖的檔案名稱,其中,type是表徵圖的類型。這樣,我們可以自訂這些表徵圖,同時,表徵圖也可以是Flash。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.