Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Adding Custom Code in SSRS Chart Report Expand / Collapse
Author
Message
Posted Thursday, March 05, 2009 10:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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.

Post #669930
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse