.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Expression to pick a chart series color by ordinal from custom palette

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :Sql Server


This is probably an easy question but I cannot find a solution to this. The stored procedure that I use to retrieve data for my bar chart in SSRS returns an ordinal number for each row, which represents a group the item belongs to. For example, I get:

Car - 20% - 1
Bus - 10% - 1
Train - 15% - 1
Bike - 3% - 2
Inline skates - 16% - 2

so 1 is all vehicles with an engine, and 2  all vehicles without engine. What I would like to do is to plot a bar with the percentage for each row and in the color of the custom palette, so Car, Bus and Train would get the first color of the user defined palette, Bike and Inline skates would be the second color of the custom palette.

I think I have to use the Choose function in the expression for this but I cannot figure out how to access the custom palette to retrieve all colors.


I know I could retrieve a color code from the database instead of the group ordinal, but I would prefer to have the color being picked from the custom palette; is this possible?

Thank you,



View Complete Post

More Related Resource Links

Error using expressions to define a color in a Custom Color Palette

I have a report where I would like to have a parameter define the colors in a custom color palette in SSRS 2008.  Within the CustomPaletteColors property for a chart you can use an expression to define the color.  However, whenever I use the value of a parameter to define the color value, the chart just shows the error message 'Object reference not set to an instance of an object."

I also get the same error message if I try using custom code and reference a function that would retrieve the colors. 

Is this happening because of how the rendering engine is working?  Is this property being defined before the paramters and custom code initialize?  Is it possible to define a custom palette using parameters and custom code?  If so, how?

Changing background Color of a custom slider when IsEnabled = False (Expression Blend)


I have a customized slider control. When the control is set to IsEnabled=false, the color changes to the default desabled color. How do I change this to a different color in Expression blend? I have tried unchecking IsEnabled property in Expression Blend, and changing the color, but is still takes the default disabled color. 


Would appreciate if anyone knows how to do this using Expression Blend


Thank you


Silverlight: Create a Custom Expression Encoder Publishing Plug-In


Laurence Moroney demonstrates how to employ the Expression Encoder plug-in APIs by building and debugging a simple FTP upload plug-in.

Laurence Moroney

MSDN Magazine February 2008

How to create a custom Gantt Chart for SharePoint using VS

So I have been told you can't create a custom gantt chart using SharePoint Designer.  I don't believe that actually, there must be a way to create one from scratch using SPD and a Data View and editing the XSL directly....but assuming there is not..

Are there any articles that explain for a non-developer how to create a custom gantt chart for a SharePoint site using Visual Studio 2008?


Missing Points in Chart Series

Okay so I have 3 series that are created from Cross Table Data Bind. Unfortunately some of the points are missing. Is there an algorithm I can use to cycle through the datapoints for each series and insert empty points to the correct spots so that my data is displayed correctly?

reporting services xy scatter chart with three data series

Hi, I have a report that includes an XY scatter chart with three data series.  Two of the data series are + and - tollerance bands and the thrid data series is the test points.  The data displays in the graph but I only seem to be able to get all three series to display as a line or all three to display as data points.  I need the tolerance bands to be a line and the test point to be displayed as data points without a line joining them up. Please can you provide a solution.   Thanks

Regarding WPF Line Series Chart how to set this