|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Sunday, March 08, 2009 10:42 PM
Points: 1,
Visits: 11
|
|
Hi I am working on SSRS chart report.I am trying to add Custom color palatte to report For this i am using below code Private colorPalette As String() = {"Green", "Blue", "Red", "Orange", "Aqua", "Teal", "Gold", "RoyalBlue", "MistyRose", "LightGreen", "LemonChiffon", "LightSteelBlue", "#F1E7D6", "#E16C56", "#CFBA9B"} Private count As Integer = 0 Private mapping As New System.Collections.Hashtable() Public Function GetColor(ByVal groupingValue As String) As String If mapping.ContainsKey(groupingValue) Then Return mapping(groupingValue) End If Dim c As String = colorPalette(count Mod colorPalette.Length) count = count + 1 mapping.Add(groupingValue, c) Return c End Function I copied it from below MSDN link http://msdn.microsoft.com/en-us/library/aa964128.aspx Code is giving below error [BC42104] Variable 'c' is used before it has been assigned a value. A null reference exception could result at runtime. Please help me to rectify this.
|
|
|
|