Winform RDLC 主/明细报表显示记录在下一页 [英] Winform RDLC master/detail report display record on next page

查看:30
本文介绍了Winform RDLC 主/明细报表显示记录在下一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Visual Studio 2013、WinForm、客户端 (.rdlc) 报告和 C# 构建主/详细报告.

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:

假设报告显示 50 条记录超过 10 页.在此流程中,如果记录(发票标题 + 发票详细信息)相对靠近页面末尾显示并且没有足够的空间容纳一页,它将溢出到下一页.所以我想在这里添加一个 PAGE BREAK,以便记录(发票标题 + 发票详细信息)应该完全移动到下一页.

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.

这可能吗?

我试图避免这样的情况,即某些部分显示在一页上,而某些部分显示在另一页上.

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.

推荐答案

您似乎在使用子报表.我不确定是否可以使用子报告获得您需要的内容(可能是,我只是不知道).如果这对您来说不是一个大问题,我认为使用您的数据创建单个数据源然后使用 Tablix 分组可能性要容易得多,以便在可能的情况下在单个页面上对您的组进行排序、分组和保持在一起.为此,您必须选择您的 Row Groups(两个)并设置 KeepTogether = True

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 报告

A5 XPS 报告

如果这有用,我包含了您项目的修改版本c#项目

If this can be useful, I included a modified version of your project c# Project

这篇关于Winform RDLC 主/明细报表显示记录在下一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆