Deploying SSRS Reports can be a painful task. 2012 is a bit better than 2008. It’s even worse if you do not have BIDS installed. And more worse if you use shared data sources. (telling from my recent experience)
Fortunately I found this PowerShell script, but unfortunately it lacks any sort of documentation.
After a bit of googling, and removing the lines
if ([Convert]::ToBoolean($ConnProps.IntegratedSecurity)) { $Definition.CredentialRetrieval = 'Integrated' }
which always caused the error
ForEach-Object : Die IntegratedSecurity-Eigenschaft wurde für dieses Objekt nicht gefunden. Stellen Sie sicher, dass sie vorhanden ist. Bei D:\projects\wms\Deploy-SSRSProject.ps1\Deploy-SSRSProject.ps1:150 Zeichen:19 + ForEach-Object <<<< {
+ CategoryInfo : InvalidOperation: (.:OperatorToken) [ForEach-Object], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFoundStrict,Microsoft.PowerShell.Commands.ForEachObjectCommandForEach-Object : Property ‘IntegratedSecurity’ cannot be found on this object; make sure it exists
At D:\projects\wms\Deploy-SSRSProject.ps1\Deploy-SSRSProject.ps1:150 char:19
+ ForEach-Object <<<< {
+ CategoryInfo : InvalidOperation: (.:OperatorToken) [ForEach-Object], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFoundStrict,Microsoft.PowerShell.Commands.ForEachObjectCommand
because my project uses SQL Authentication rather than integrated security to log on to the database.
I got the script to run using the following PS code:
$pwd = ConvertTo-SecureString "ThePassWord" -asplaintext -force $cred = new-object System.Management.Automation.PSCredential "TheUser", $pwd & ./Deploy-SSRSProject.ps1 -path "C:\path\to\my.rptproj" -configuration "Debug" -credential $cred -verbose
where “Debug” is a configuration defined in the .rptproj.
After running the script, all .rdl files had the current timestamp on http://localhost/Reports/Pages/Folder.aspx?ItemPath=%2fMyProject&ViewMode=Detail.
The shared data source in the Data Sources directory are not being updated because the command line parameter -OverwriteDataSources is not passed to the New-SSRSDataSource function.
Update: The PowerShell script has been moved here https://gist.github.com/jstangroome/3043878
Pingback: Working around SSRS error “is ambiguous in the namespace” | devioblog