SSRS tablix split report into two sets of columns

前端 未结 1 1040
终归单人心
终归单人心 2021-01-12 22:54

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

相关标签:
1条回答
  • 2021-01-12 23:19

    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.

    0 讨论(0)
提交回复
热议问题