Define the order of categorical axes in SSRS 2008 chart control

Ryan picture Ryan · Jul 14, 2011 · Viewed 21.6k times · Source

I'm trying to make a VERY simple graph with the chart control in SSRS 2008 and, of course, Microsoft wants to make things as difficult as possible. The x-axis contains stations on an assembly line and the y-axis contains some numerical value that is irrelevant to the issue. I'm returning a dataset with the scanning stations in the order that they exist on the assembly line. However, when I bind the dataset to a chart control the stations are put in alphabetical order! I don't want the categories on the x-axis to be in alphabetical order. I want them to display in the order that they are returned in the dataset. I suppose I could number the stations in the order that I want but I would rather not do that. Thanks in advance.

Answer

Cam L picture Cam L · Jul 15, 2011

When you add a Category Group to a chart, the Chart control adds a Sort criterion by default.

To remove this behavior, you can right-click on the Category Group, go to Sorting tab, and delete the entry there. Preview the report again and the stations should be in the order you want.

Hope this helps.