Skip to content

Instantly share code, notes, and snippets.

@kitmenke
Created March 26, 2014 13:20
Show Gist options
  • Save kitmenke/9782966 to your computer and use it in GitHub Desktop.
Save kitmenke/9782966 to your computer and use it in GitHub Desktop.
Update a report's shared data source
string itemPath = "http://servername/sites/reporting/Report Library/My_Report.rdl";
string dataSourceName = "Datasource1";
DataSource[] dsarray = new DataSource[1];
DataSourceReference reference = new DataSourceReference();
reference.Reference = "http://servername/sites/reporting/Data Sources/DATA_SOURCE_NET.rsds";
dsarray[0] = new DataSource();
dsarray[0].Name = dataSourceName;
dsarray[0].Item = reference;
rs.SetItemDataSources(itemPath, dsarray);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment