问题
I am building master/detail report using Visual Studio 2013, WinForm, Client Side (.rdlc) report and C#.
This is Sales Report where I show the Invoice Header and its related Invoice Details. The report looks like this:
Lets say the report shows 50 records over 10 pages. In this flow if a record (Invoice Header + Invoice Details) is displayed relatively towards the end the page and does not have enough space to fit on 1 page it will spill over to the next page. So I want to add a PAGE BREAK here so that the record (Invoice Header + Invoice Details) should completely move to the next page.
Is this possible?
I am trying to avoid a situation like this where some part is displayed on 1 page and some part get displayed on another page.
回答1:
Edit:
It looks like you're using a subreport. I'm not sure it's possible to obtain what you need using a subreport (it might be, I just don't know). If it's not a huge problem for you I think It's much easier to create a single datasource with your data and then use a Tablix grouping possibilities to sort, group and keep your groups together on a single page when possible. In order to do that you must select your Row Groups (both of them) and set KeepTogether = True
Check these reports that I created form your data, using the aforementioned method:
A4 PDF Report
A5 XPS Report
If this can be useful, I included a modified version of your project c# Project
来源:https://stackoverflow.com/questions/20789726/winform-rdlc-master-detail-report-display-record-on-next-page