February 1, 2013 at 12:28 pm
I have SSRS 2008R2 reporting having 3 data sources.
Say reportname = \Marketing\Test.rdl
DataSource name = \Shared DataSources\Data1 , 2 ,3
Now when deploy the report using reports manager upload functionality , after deployment it looses all three connection reference.
is there any powershell script to set again correct datasource for this 1 report.
February 4, 2013 at 8:47 am
Can anyone tell what's missing in this?
-------------------------------------------------------
$reportServerName = "SSRS01"
$currentPath ="/Marketing/test1"
$reportServerUri = "http://{0}/ReportServer/ReportService2010.asmx" -f $reportServerName
$proxy = New-WebServiceProxy -Uri $reportServerUri -Namespace SSRS.ReportingService2010 -UseDefaultCredential
$type =$proxy.GetType().Namespace
$dataSourceArrayType = ($type + '.DataSource[]')
$dataSourceType = ($type +'.DataSource')
$numDataSources = 3
$dataSourceArray = New-Object ($dataSourceArrayType)$numDataSources
$dataSourceArray[0] = New-Object ($dataSourceType)
$dataSourceArray[0].Name = "Marketing1"
$dataSourceArray[0].Item = New-Object ($dataSourceReferenceType)
$dataSourceArray[0].Item.Reference = "/Shared Data Sources/Marketing1"
$dataSourceArray[1] = New-Object ($dataSourceType)
$dataSourceArray[1].Name = "Marketing2"
$dataSourceArray[1].Item = New-Object ($dataSourceReferenceType)
$dataSourceArray[1].Item.Reference = "/Shared Data Sources/Marketing2"
$dataSourceArray[2] = New-Object ($dataSourceType)
$dataSourceArray[2].Name = "Marketing3"
$dataSourceArray[2].Item = New-Object ($dataSourceReferenceType)
$dataSourceArray[2].Item.Reference = "/Shared Data Sources/Marketing3"
$proxy.setItemDataSources ($currentPath,$DataSourceArray)
May 17, 2013 at 3:40 am
For one, you do not define $dataSourceReferenceType:
$dataSourceReferenceType=New-Object "$ns.DataSourceReference"
What's the output?
Jeroen
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy