Question

I have a report that lists some basic data about a company for all (possibly) 52 weeks of the year. The report takes in parameters of year and UptoWeek. So for example i can put in 2013 and 31 and it will spit out all the values for year 2013 up to week 31. Right now it looks like:

 Week  Dollars   PY Dollars   Change
 1     5         4            1
 2     20        25           -5
 ...
 52

I want it to split into two sets of columns at the halfway point, so the left side is 1-25 and the right side is 26-52 like so

 Week  Dollars   PY Dollars   Change    Week  Dollars   PY Dollars   Change 
 1     5         4            1         26
 2     20        25           -5        27
 ...                                    ...
 25                                     52

Is this possible in tablix?

The one thing I was thinking was to just copy the tablix next to itself and hide rows higher than 25 on the left, and lower than 26 on the right. I'm just not sure if that's the best way to handle this...

Was it helpful?

Solution

You could set up a column group based on an expression like:

=IIf(Fields!Week.Value <= 26, 1, 0)

Note that this is set to 26, as 26 really should be on the left side, I think.

Your row group expression will need to be something like:

=(Fields!Week.Value - 1) Mod 26

So say I have data like this:

enter image description here

(snip)

enter image description here

And a tablix like this, grouped as above:

enter image description here

With the above grouping, this works for me:

enter image description here

(snip)

enter image description here

This will split your data into two groups based and week and as such will meet your requirements. Since you're only interested in two groups and have a ready-made row number in Week, you can keep the expression simple.

Side-by-side tablixes would most likely be fine, too, but SSRS is notoriously temperamental with adjacent objects. Using grouping as above keeps this as one item at the designer level.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top