替换Reporting Services RDLC报告的DataSource

时间:2021-03-30 08:18:00

I am making some changes and need to change the DataSource for my report. How can I do that without losing all of the work I have done? Assume the field names are the same.

我正在进行一些更改,需要更改我的报告的DataSource。如何在不失去我所做的所有工作的情况下做到这一点?假设字段名称相同。

Update: The reports are still in Visual Studio and I need to change from a TableAdapter to a DataTable which I will fill through a class.

更新:报告仍在Visual Studio中,我需要从TableAdapter更改为DataTable,我将通过类填充。

Update 2: Currently it is using fields in CustomerService_report_vw_ServiceRequest, I want to change that to CustomerService_ServiceRequest. I am seeing this in the expression editor. So when I select the Fields option in the Expression Editor, I want to see the fields in CustomerService_ServiceRequest.

更新2:目前它正在使用CustomerService_report_vw_ServiceRequest中的字段,我想将其更改为CustomerService_ServiceRequest。我在表达式编辑器中看到了这一点。因此,当我在表达式编辑器中选择Fields选项时,我想查看CustomerService_ServiceRequest中的字段。

Does that make more sense?

那更有意义吗?

Update 3: So if you add a field from the other DataTable, you can switch your DataSetName to the new one. Now, how do I remove the old one?

更新3:因此,如果您从其他DataTable添加字段,则可以将DataSetName切换为新的DataSetName。现在,我该如何删除旧的?

2 个解决方案

#1


I manually edited the *rldc file in a text editor and edited the XML therein to removed the DataSet.

我在文本编辑器中手动编辑了* rldc文件,并在其中编辑了XML以删除DataSet。

#2


If you already have the reports uploaded to the report server, the simplest thing would be to go into the properties of your report and then configure the data source information in there.

如果您已将报告上载到报告服务器,最简单的方法是进入报告的属性,然后在其中配置数据源信息。

More information: Setting Data Source Properties in Reporting Services

更多信息:在Reporting Services中设置数据源属性

#1


I manually edited the *rldc file in a text editor and edited the XML therein to removed the DataSet.

我在文本编辑器中手动编辑了* rldc文件,并在其中编辑了XML以删除DataSet。

#2


If you already have the reports uploaded to the report server, the simplest thing would be to go into the properties of your report and then configure the data source information in there.

如果您已将报告上载到报告服务器,最简单的方法是进入报告的属性,然后在其中配置数据源信息。

More information: Setting Data Source Properties in Reporting Services

更多信息:在Reporting Services中设置数据源属性