RDLC 报告数据不会更新以反映更改 [英] RDLC Report Data doesn't update to reflect changes

查看:54
本文介绍了RDLC 报告数据不会更新以反映更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 RDLC 页面上,报告数据"窗口显示了一个自定义数据集,它从中提取字段以进行显示.我用一些额外的表修改了这个数据集.但是,这些表没有显示,因此我无法选择它们用于表达式(在表达式窗口中的数据集下,只有最初存在的表,而不是我添加的其他表).

On my RDLC page, the "Report Data" window shows a custom dataset that it pulls fields from to display. I've modified this DataSet with some additional tables. However, these tables aren't shown and therefore I'm unable to select them for use in expressions (in the Expression window, under Datasets, there are only the tables that were originally there, not the additional tables I've added).

刷新数据源没有任何作用,如果我右键单击它并选择新建数据集",我将无法选择父数据源(它不会出现在下拉列表中).我的意思是,如果数据源被称为MyDataSet",并且在其下是其他数据集,如果我右键单击并转到添加数据集",它会弹出对话框但MyDataSet"不是 在可用数据源列表中,即使我特别说我想向该数据源添加数据表.另一个现有的数据表将它列在数据源下,但新的没有.

Refreshing the data source doesn't do anything, and if I right-click on it and select "New Dataset", I'm unable to select the parent data source (it doesn't appear in the drop down list). What I mean is, if the data source is called "MyDataSet", and under that are other DataSets, if I right-click and go to "Add Dataset", it brings up the dialog box but "MyDataSet" is not in the list of available Data sources, even though I'm specifically saying I want to add a datatable to that data source. The other, existing, datatables list it under the data source, but new ones do not.

如何刷新数据源,以便在我的报告中访问这些新表?

How do I refresh the data source so I can access these new tables in my report?

推荐答案

这是一个老问题,但我也遇到了这个问题,我会为未来的 googlers 提一下我的答案.

This is an old question, but I was having this problem too and I'll mention my answer for future googlers.

在报告数据窗口(当我编辑 .rdlc 文件时会自动出现)中,我必须刷新我的数据集(与我的 .rdlc 报告中 Tablix 中的 DataSetName 同名),然后更新.rdlc 文件的 XML.然后我可以使用新字段.

In the Report Data Window (which automatically appears for me when I am editing a .rdlc file), I had to Refresh my Dataset (same name as the DataSetName in the Tablix in my .rdlc Report), and then that updated the XML of the .rdlc file. The new fields are then available to me.

这篇关于RDLC 报告数据不会更新以反映更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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