SSRS 2005 - line chart - empty points - series color
I would like to create a Line Chart in report using SSRS 2005 with a specific line color for each line, using a data field to define the color in the Color Expression property (like iif(Fields!S.Value = "I", "RED","Green")), I am using the Series groups. When I do this with a Scatter XY and Bar Chart Types, everything goes well, but when I choose the Line Chart I have lines with two colors, I tried many things but I still have the problem. Any Idea? Thanks in advanced
June 25th, 2012 12:45pm

Hi, Looks like you are also using EmptyPoint color. You can do this by setting expression in EmptyPoint color. Steps:- In report designer, Open Property PaneSelect the line from chart.In properties, expand data->emptypointFor color, set below expression =iif(Fields!S.Value = "I", "RED","Green") - Chintak (My Blog)
Free Windows Admin Tool Kit Click here and download it now
June 26th, 2012 2:40am

Hi, Looks like you are also using EmptyPoint color. You can do this by setting expression in EmptyPoint color. Steps:- In report designer, Open Property PaneSelect the line from chart.In properties, expand data->emptypointFor color, set below expression =iif(Fields!S.Value = "I", "RED","Green") - Chintak (My Blog)
June 26th, 2012 2:40am

Hi Chintak, Thanks very much for your response. You identify the problem, for this example, I removed the Empty points from the DataSet and everything goes well. But Im using ssrs 2005 and it seems that in ssrs 2005 the Empty points are treated automatically (from the property pane, I cannot find the Emptypointy session). Is there a way to control the color as we can do in ssrs 2008? I cant avoid the empty points. Thanks in advanced
Free Windows Admin Tool Kit Click here and download it now
June 26th, 2012 9:25am

Hi Chintak, Thanks very much for your response. You identify the problem, for this example, I removed the Empty points from the DataSet and everything goes well. But Im using ssrs 2005 and it seems that in ssrs 2005 the Empty points are treated automatically (from the property pane, I cannot find the Emptypointy session). Is there a way to control the color as we can do in ssrs 2008? I cant avoid the empty points. Thanks in advanced
June 26th, 2012 9:32am

Hi, I have tried to reproduce this in 2005, but not able to do so. Still trying, Update you if i am able to do this. Also, one thing I have noticed is, if you select palate called "semi transparent", you can get rad and green color line. But this certainly not a solution, see if for time being its useful. - Chintak (My Blog)
Free Windows Admin Tool Kit Click here and download it now
June 27th, 2012 1:50am

Hi, I have tried to reproduce this in 2005, but not able to do so. Still trying, Update you if i am able to do this. Also, one thing I have noticed is, if you select palate called "semi transparent", you can get rad and green color line. But this certainly not a solution, see if for time being its useful. - Chintak (My Blog)
June 27th, 2012 1:57am

Hi Ufi, I reproduce the issue in my local environment according to your description, and I get the same result with yours. But when I change the expression to: =Switch(fields!S.value =I,Red, fields!S.value =E,Green) The issue disappear. The screenshot below are for your reference: Please free feel to ask if you have anything unclear. Regards, Charlie Liao
Free Windows Admin Tool Kit Click here and download it now
June 27th, 2012 9:39pm

Hi Charlie, The only thing I could say was, Woohoo! I could not believe this. After this, I tryed many things, one of them was to use the Report Code to get the color: Public Function GetColor(ByVal Sinal as string) As String Select Case Sinal Case "I" return "Red" Case "E" return "Green" 'Case Else 'return "Black" End Select 'return "Black" End Function And for the Color Expression use: =Code.GetColor(Fields!S.Value) But, In my case, it seems working if I comment the last Instruction (return "Black") or comment the "Case Else" option. I said "it Seems working" because just one detail can change everything. I would like to understand this behavior, but it's okay, it's working, that's what I want. Thank you all, thank you very much Charlie and Chintak. Regards, Ufi
June 30th, 2012 2:44pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics