One of the new features of Analysis Services 2005 is KPIs, but this functionality is not available in Reporting Services 2005, meaning that Reporting Services 2005 cannot read analysis Services KPI, there are two solutions available:
1. Through the Builder
We can create reports in Report Builder to directly read the KPIs that have been set up in Analysis Services, and because Report Builder has limited reporting, we can save reports that have been added to the KPI. Use the development environment to open other settings and add additional functionality.
The disadvantage is that we cannot set the icon for the KPI.
2. Use custom code
In the development environment, we can also use custom code to complete the reading of KPIs.
First we need to read the required KPI icons to the report so that we can use them in the report or read them to the project so that all the reports in the project can take advantage of the icons.
Next we set the following code:
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
Custom functions are set in the image's property value by the state and trend values read from the cube.
=code. Getface (fields! Product_gross_profit_margin_ State _. Value, "cyl")
To get the filename of the icon, where type is the icon. In this way, we can customize these icons, while the icon can also be flash.