SSRS customized pie chart color

reporting-servicesssrs-2008

I have a doubt here,

I need to show a pie-chart in SSRS, for the student results according to their status(Pass/Fail)…….I have only 4 conditions Male-pass,Male-fail,Female-pass,Female-fail,I need to show these things with my own color,

for this am using the switch condition as

=Switch(
((Fields!Gender.Value = "Male")&(Fields!Status.Value="Pass")), "Blue",
((Fields!Gender.Value = "Male")&(Fields!Status.Value="Fail")), "HotPink",
((Fields!Gender.Value = "Female")&(Fields!Status.Value="Fail")), "Orange",
((Fields!Gender.Value = "Female")&(Fields!Status.Value="Pass")),"LimeGreen" )

but in the preview it shows only the default color set, not the customized one, can anyone fix this one…thanks in advance

Best Solution

Try using something like

 =IIf((Fields!Gender.Value = "Male") and (Fields!Status.Value="Pass"),"Green", 
IIf((Fields!Gender.Value = "Male") and(Fields!Status.Value="Fail"),"Red" ,
IIf((Fields!Gender.Value = "Female") and (Fields!Status.Value="Fail") ,"Blue",
(Fields!Gender.Value = "Female") and (Fields!Status.Value="Pass"),"Yellow","Orange"
,"#00000000"))))
Related Question