Search code examples
reporting-servicesssrs-2008ssrs-2008-r2ssrs-tablixssrs-grouping

SSRS page break after row with subreport (in rectangle)


I've spend hours searching for a solution for something 'simple'. I have a report (SSRS 2008 R2) with a tablix with rows grouped on saleslineid. For each salesline I want to show a sub-report with specs and after that the components of the salesline. But I want the list of components to start on a new page.

For instance:

SPECS:

Object A

Color Brown

Height 200

-- PAGE BREAK! --

LIST OF COMPONENTS

Item Description

100 COMP1

101 COMP2

etc

As you can see in the picture I've put my subreport in a rectangle and set PageBreak - Breaklocation to End.

SSRS layout

Tried it with an inbetween row with a rectangle too. Read about 100 pages with more or less similar issues but I can't get it to work?

Can this be done?

Kind regards,

Mike


Solution

  • I didn't find a way to solve it with a rectangle triggering a page-break so I decided to add one extra field linetype and one extra record to my query with a UNION.

    E.g:

    Select 1 as linetype, A.SalesId, B.SalesName
    UNION
    Select 0 as linetype, A.SalesId, NULL as SalesName
    

    In the UNION query I skip fields I don't really need in that section to keep things readable.

    With this new group I can force a new page and I hide rows in my tablix based on linetype enter image description here

    The thing I dislike is that my already hard to read sql query is doubled in size but it does the job..