简体   繁体   English

将现有数据集添加到Report .rdlc

[英]Add an existing DataSet to Report .rdlc

I have a Report. 我有一份报告。 I need to create another one, similar to the one I have. 我需要创建另一个,类似于我拥有的一个。 So I created a second report by copying the first one. 因此,我通过复制第一个报告创建了第二个报告。 Then I created a new DataSet for the new report. 然后,我为新报告创建了一个新的数据集。 I created it also by copying the original dataset (from the first report), and changing the name. 我还通过复制原始数据集(来自第一个报告)并更改名称来创建它。 Now, when I want to add the new DataSet in the new Report, it doesn't appear in DataSet option in "new Dataset.." 现在,当我想在新报表中添加新数据集时,它没有出现在“新数据集”的“数据集”选项中。

在此处输入图片说明

What am I missing? 我想念什么? Why can't I see the DataSet that I've created? 为什么看不到我创建的数据集?

Finally I solve this. 最后,我解决了这个问题。 The problem was that when I copied the DataSet, I changed the name of the new one, but in the code behind, the name didn't change. 问题在于,当我复制数据集时,我更改了新数据集的名称,但是在后面的代码中,名称没有更改。 So, I open the DataSet with XML Editor, edit Name, save, re-compile, and it appeared! 因此,我用XML编辑器打开了数据集,编辑名称,保存,重新编译,它就出现了!

You could try opening the rdlc file with an xml editor and manually copying out the data source and into your new one. 您可以尝试使用xml编辑器打开rdlc文件,然后手动将数据源复制到新的数据源中。 I'm not sure why it wouldn't appear in your dropdown, I don't usually use that interface for rdlcs 我不确定为什么它不会出现在您的下拉菜单中,我通常不将该接口用于rdlcs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM