开发者

Reporting Services add-in to Sharepoint: how to change report's data source programmatically?

We are using Reporting Services add-in for Sharepoint Technologies. We keep our report files in a document library list on Sharepoint. Then with some code we copy these reports to a different document library. The problem is that after copying, the report cannot be displayed because it has invalid Data 开发者_运维百科Source. You have to go to "Manage Data Sources" in a context menu and point to original Data Source's location. But we need to do this programmatically. I haven't noticed any change in the report itself (its inner xml) after changing the data source's path. Is there any way we can do this?


You can when working in Local Processing Mode. Take a look at the ReportViewer.LocalReport.DataSources collection

This collection holds an array of Datasources. What you specify here (prior to loading the report) will be used when generating the report via the RDLC file (XML file).


Not sure how it will work with sharepoint as i've not really used it, but this article shows you a way to change the connection info at run time

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜