Hello!
We are using a PowerShell script to upload 2 RDL-Files to our SharePoint sites. This is working well for one of the RDL-file but not for the second one.
We are getting following error message:
Exception calling "CreateReport" with "6" argument(s): "The report definition is not valid or supported by this version of Reporting Services. This could be the result of publishing a report definition of a later version of Reporting Services, or that the report definition contains XML that is not well-formed or the XML is not valid based on the Report Definition schema. Details: Invalid character in the given encoding. Line 1668, position 164.
In the coe we are using following syntax:
[Warning[]]$warnings = $null $rptFileInfo = Get-Item ($rptReference); $rptName = $rptFileInfo.Name; [xml] $rptXml = Get-Content ($rptReference); [Byte[]]$rptContent = Get-Content $rptReference -Encoding byte [CatalogItem] $item = $rs06.CreateReport($rptName,$targetRptLib,$true,$rptContent,$null,[ref] $warnings ) WRITE-HOST -FOREGROUND GREEN 'Successfully published report:' $rptName
I have checked the RDL-file and cannot see any problems. Uploading the RDL via the GUI is working fine.
Do you know what is the cause of that error?
Many thanks
Joerg