I am trying to group an SSRS report so that each page breaks naturally around the 11 inch mark.
It looks as though you cannot dynamically set the Interactive Height
property so I have set it to 0 and am applying page breaks to the dataset.
I am making the assumption that roughly every 3 users will take up about a full page. I want to break after every 3 EmployeeID groupings. I have only seen breaks which consider the RowCount
, which is inconsistent per user in my dataset. A user can have 1 or Many rows.
How can I break after 3 occurences of an SSRS sub group?
Here is an image of the current grouping I have:
I need the Header (title, Period and blank line) to appear on every new page.
On every page I want to take up as much of the 11 inches as possible, but I am willing to settle on simply stating that we will break after every 3 occurrences of the EmployeeID
group.
The EmployeeID2
group may not be necessary, it was implemented when I was experimenting with RowNumber
breaks.
There are two possible solutions to my issue as I see it:
- Somebody tells me how to set a parameterized Page Break every 11 inches
- Somebody tells me how to set a parameterized Page Break every
n
occurrences of an SSRS subgroup
Finally, additional clarification:
I need a parameter which toggles
PageBreak
. If thePageBreak Parameter
is set toFalse
, the Header will appear only once and all Employees will display as withInterActive Height = 0
. If thePageBreak Parameter
is set toTrue
, the Header will appear at the top of every new page, and every page will contain 3 Employees.
I tried implementing a Grouping field in my Stored Procedure
which assigns every 3 Employees an incrementing Group ID using the code below, however this query which runs in 3 seconds is now freezing SSRS, so I am hoping to achieve the grouping using SSRS functions.
TSQL Grouping Logic:
,EmpRank AS (
SELECT DISTINCT
EmployeeID
,DENSE_RANK() OVER(ORDER BY FormattedName) AS 'EmpCounter'
FROM FilteredData
)
,EmpGrouping AS (
SELECT
EmployeeID
,((EmpCounter -1 ) / 3) AS 'EmpGroup'
FROM EmpRank
GROUP BY ((EmpCounter - 1) / 3)
,EmployeeID
)
SELECT
FilteredData.*
,EmpGrouping.EmpGroup
FROM FilteredData
LEFT OUTER JOIN EmpGrouping
ON EmpGrouping.EmployeeID = FilteredData.EmployeeID
ORDER BY EmpGroup, EmployeeID
Thank you in advance