ReportViewer控件本地报告未显示所有记录/行 [英] ReportViewer Control Local Report not showing all records/rows

查看:76
本文介绍了ReportViewer控件本地报告未显示所有记录/行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

另一位用户在网上发布了这个问题,但我找不到任何回复,并且遇到了同样的问题:我正在动态创建一个ReportViewer控件并在winforms中加载本地报表。在添加适当的数据源之后,ReportViewer会间歇性地不显示应显示的所有行/记录(例如,只应显示2应该显示4)。刷新通常会纠正问题,但这不是首选修复。

我在代码中设置数据源,报告包含带参数和过滤的子报告。我也将RefreshReport称为我的报告预览加载方法中的最后一个调用。任何信息都将非常感谢。

Nicholas

Another user posted this question on the web but I couldn't find any replies to it and am having the same problem:
I am dynamically creating a ReportViewer control and loading a local report in winforms.  After adding appropriate datasources, the ReportViewer intermittently does 
not show all the rows/records that should be displayed (e.g. only showing 2 when there should be 4).  Refresh will usually correct the problem but that is not a preferred fix.

I am setting the datasource in code and the report has subreports with parameters and filtering.  I'm also calling RefreshReport as the last call in my Report Preview Load method
Any info would be much appreciated.

Nicholas

推荐答案

我在几个报告中遇到同样的问题。我没有子报告......只是文本框和(有时)列表。我在运行时动态更改数据源,当报表运行时,有时会显示所有记录,有时则不显示。每当它不显示所有记录时,它总是在第一页停止。例如,如果应该有五页数据,它将永远不会显示前两个(或三个),它将始终显示所有五个页面,或仅显示第一页。

我已经检查了在运行时被馈送到数据源的实际数据集,甚至在这个"错误"时也是如此。发生了,数据集仍然说它有所有记录...所以这不是数据集没有正确填充的问题......数据集总是有完整的记录数...这是报告查看器,只是随机决定不要全部显示。

WATYF
I am having this same problem on several reports. No subreports for me... just textboxes and (sometimes) lists. I dynamically change the datasource at runtime and when the report runs, sometimes it shows all the records and sometimes it does not. Whenever it doesn't show all records, it always stops at the first page. For example, if there's supposed to be five pages of data, it will never show just the first two (or three), it will always show either all five pages, or only the first page.

I've checked the actual dataset being fed to the datasource at runtime, and even when this "error" happens, the dataset still says it has all the records in them... so it's not a matter of the dataset not getting populated properly... the dataset always has the full amount of records... it's the reportviewer that just randomly decides not to show them all.

WATYF


这篇关于ReportViewer控件本地报告未显示所有记录/行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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