Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS continue on next column for every page

I'm building an SSRS report (2016) with 2 columns:

---------------------------------------------
| ID | Service Number | ID | Service Number |
| 1  |        A       | 11 |      K         |
| 2  |        B       | 12 |      L         |
| 3  |        C       | 13 |      M         |
| 4  |        D       | 14 |      N         |
| 5  |        E       | 15 |      O         |
| 6  |        F       | 16 |      P         |
| 7  |        G       | 17 |      Q         |
| 8  |        H       | 18 |      R         |
| 9  |        I       | 19 |      S         |
| 10 |        J       | 20 |      T         |
---------------------------------------------

Requirements:

  • The data should first completely occupy the left list and then start with the right. This should be per page. So, for ex: If my total records are 100 and a page can handle 40 records (20 on left and 20 on right), we need to display 1 to 40 records on the first page. 40 to 80 on second one and so on.
  • Each page should have a header on left and right columns.

Notes: I already tried a solution given here: SSRS - How to continue data to next column? The problem here is, if I've just 10 records, it splits 5 on left and 5 on the right, which doesn't match my requirement.

like image 572
Nic Avatar asked Dec 28 '16 05:12

Nic


1 Answers

The last paragraph of the solution you linked to should work:

You could adapt this method to do true multi-column by working out how many rows you can fit on the page from the InteractiveSize-Height property and displaying that many columns in the left table then the rest in the right table and so on throughout the report but this might be fragile depending on renderer and changing page layout settings like margins. The method above is simple and effective.

For a fixed number of 40 records per table per page this would be:

Detail row of the first table, for the Visibility-Hidden property use the following formula:

=iif(((RowNumber(Nothing)-1)\40) Mod 2, True, False)

On the Detail row of the second table, for the Visibility-Hidden property use the opposite formula:

=iif(((RowNumber(Nothing)-1)\40) Mod 2, False, True)

This way the left side will show 1-40, right side will show row 41-80. The next page will show 81-120 on the left, 121-160 on the right, assuming one page fits 40 rows.

like image 111
R.VA Avatar answered Oct 01 '22 04:10

R.VA