Search code examples
reporting-servicesssrs-2014

Change rendered display to show chart horizontally (x number of columns)


I've got a report in SSRS (I believe version 2014) that has a chart within a tablix as shown:

enter image description here

When I click "View Report" it shows like so:

enter image description here

Notice how it displays each chart (per detail) going down vertically. Is there an easy way or property I could use to say display horizontally x number of columns. So instead of one chart per row, show the next one right next to it...and so on horizontally until it hits the "x" number. So it would show WP 10.45 then next to it the chart for WP 3.05 etc.


Solution

  • tl;dr: I ended up copying the tablix and then setting a filter.

    Technical Details

    For anyone else wanting to do this and needs a better explanation here is exactly what I did.

    Remember the tablix I first created that I mentioned in my original question. This one:

    enter image description here

    I went ahead and copied this entire tablix (as another tablix) and placed both of them on top of the rectangle object within Reporting Services. They are the exact same tablix reports content:

    enter image description here

    Its hard to see but they are both on top of a rectangle object. With that being said I then went to the properties of my tablix and went to the filters section:

    enter image description here

    Notice the expression, when I click the expression button this is the expression I have entered:

    =Fields!SortOrder.Value Mod 2

    Now you may be asking what the heck is SortOrder, well this is specific to my business case. Each one of our "milestones" has a sort order associated with it. We did not want to sort alphabetically because A-Z wouldn't matter. We had to provide a column to ensure our milestones lined up correctly and this sort order in our table did this.

    Now you may also be wondering why Mod 2. Well only because we wanted to show 2 charts side by side. If you wanted to show 3 charts you'd use Mod 3 and copy the tablix 3 times. If you wanted to show 4 charts you'd use Mod 4 and copy the tablix 4 times, etc. etc.

    By using Mod 2 in my case in combination with the SortOrder (the SortOrder field is simply an integer). I end up with a result of 0 (divides perfectly) or a value of 1 (I get a remainder). Because of this my filter holds true since one of my tablix has a filter value of 0 and the other one has a filter value of 1, as shown:

    enter image description here

    The result is really nice...we end up with this:

    enter image description here

    Compare that to what I had originally in my question and you'll see how much better this actually is. I could of also used the columns property in RS but this did not look so nice.