views:

74

answers:

2

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?

A: 

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).

Jon
but I am not using ReportViewer... this add-in allows me to view reports in sharepoint without any code from my side
agnieszka
In that case, I don't know. I haven't played with the Sharepoint module.
Jon
A: 

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

beakersoft