您如何创建每页显示 1 条记录的报告 (rdlc) [英] How do you create a report (rdlc) that shows 1 record per page
问题描述
在让它工作时遇到一些麻烦...我基本上希望报告看起来类似于:
Having some trouble getting this to work... I basically want the report to look similar to:
我记得过去这样做的方法是在报告向导中创建页面组".但是,我相信那是在 VS05 中,现在报告向导在 VS10 中非常不同.它现在有列组和行组,但没有页组,如果没有向导,我也不知道如何让它工作.如果尝试寻找教程或示例,但运气不佳.此外,gotreportviewer.com"网站非常糟糕,并没有太大帮助.
The way I remember doing this in the past was by creating "page groups" in the report wizard. However, I believe that was in VS05, and now the report wizard is very different in VS10. It now has column groups and row groups but no page groups, and I can't see how to get this to work without the wizard either. If tried looking for a tutorial or example but haven't had much luck. Also, the site 'gotreportviewer.com' is pretty terrible and has not been much help.
推荐答案
要创建每页一条记录的效果意味着您需要为报表设置一个组元素.例如,假设您有一个名为登录"的数据库表,并且您想按某个人的登录名进行分组.这是你要做的:
To create the effect of one record per page means you need to set a group element to the report. For instance assume you have a database table called "Login" and you wanted to group by a person's login name. Here is what you do:
首先向报告中添加一个表格,如下所示:
First add a table to the report like so:
该表可以在 VS2010 左侧的工具箱"中找到.添加表格后,您需要向该表格添加一个组:
The table can be found in the "Toolbox" on the left hand side of VS2010. Once the table is added you will want to add a group to this table:
在此之后,您将需要转到组的属性:
After this you will want to go to the properties of the group:
在这里,您可以简单地在组的每个实例之间设置分页符,此外,这将为您提供每页一条记录".
Here you simply can set a page break between each instance of a group, in addition, this will give you a "one record per page".
这篇关于您如何创建每页显示 1 条记录的报告 (rdlc)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!