SSRS. Page breaks inside tablix with subreports

reporting-services

I'm working on a SSRS 2008 R2 and I have a weird problem:

I have one main report that contains a tablix that is grouped by specific DataSet property to achieve page breaks between the different data, I consider it as a container for two subreports.

Inside this main report I have two rows and each one the rows contains tablix that contains a subreport. I have set both tablixes inside main tablix to "Page Break after" and seems like it is not working properly, it works if the upper subreport keeps it's content in one page, but if this report overflows to another page for let's say 1/3 of a page the lower subreport is printed right after the upper subreport. Seems like the issue is only when you are in Print Layout and exporting to PDF – and of course this is the case that I am trying to do, export to PDF from an application that calls this report through Web Service.

Is there any other ideas how to fix the page breaks to work correctly?

What I'm trying to achieve is a invoice layout that contains a dynamic height main page (header) and after the header page there should be a attachment -report that contains the details of the invoice. The header page and attachment should always start from their own separate pages. Seems like impossible to do with SSRS.

Any help would be appreciated – thanks in advance!

UPDATE:

I found a solution to this and fixed it by using List -component instead of Tablix in the main report. Grouped the List with DataSet property and added one tablix for invoice header -subreport and one tablix below for invoice detail -subreport, both in the same List element (row). For the both tablix properties I set: "Add page break after" and "Keep together on one page if possible". I just have to make sure that the Width of the main report content AND the subreport content does not overflow the page size (A4) and that solved my problem.

Best Answer

I found a solution to this and fixed it by using List -component instead of Tablix in the main report. Grouped the List with DataSet property and added one tablix for invoice header -subreport and one tablix below for invoice detail -subreport, both in the same List element (row). For the both tablix properties I set: "Add page break after" and "Keep together on one page if possible". I just have to make sure that the Width of the main report content AND the subreport content does not overflow the page size (A4) and that solved my problem.

Related Topic