You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rdl file is getting deployed without carriage return and indenting. New-SsrsReport() function in ssrs.pms1 file performs some manipulation on xmldocument object which ends up loosing formatting in xml file and prints entire xml content in single line in final rdl file.
Attached is the code fix to resolve this issue. Could you please review it and push the changes to git repo?
File - ssrs.psm1
Replace line no. 988 with following code.
# To preserve carriage return and indenting in xml file use xml text writer # $rawDefinition = [System.Text.Encoding]::UTF8.GetBytes($Definition.OuterXml) $stringWriter = New-Object System.IO.StringWriter $xmlWriter = New-Object System.Xml.XmlTextWriter($stringWriter) $xmlWriter.Formatting = [System.Xml.Formatting]::Indented $Definition.WriteContentTo($xmlWriter) $rawDefinition = [System.Text.Encoding]::UTF8.GetBytes($stringWriter.ToString()) [DeploySsrs.zip](https://github.com/mmajcica/DeploySsrs/files/12130220/DeploySsrs.zip)
Updated source code is also attached as zip file.
The text was updated successfully, but these errors were encountered:
Rdl file is getting deployed without carriage return and indenting. New-SsrsReport() function in ssrs.pms1 file performs some manipulation on xmldocument object which ends up loosing formatting in xml file and prints entire xml content in single line in final rdl file.
Attached is the code fix to resolve this issue. Could you please review it and push the changes to git repo?
File - ssrs.psm1
Replace line no. 988 with following code.
# To preserve carriage return and indenting in xml file use xml text writer # $rawDefinition = [System.Text.Encoding]::UTF8.GetBytes($Definition.OuterXml) $stringWriter = New-Object System.IO.StringWriter $xmlWriter = New-Object System.Xml.XmlTextWriter($stringWriter) $xmlWriter.Formatting = [System.Xml.Formatting]::Indented $Definition.WriteContentTo($xmlWriter) $rawDefinition = [System.Text.Encoding]::UTF8.GetBytes($stringWriter.ToString()) [DeploySsrs.zip](https://github.com/mmajcica/DeploySsrs/files/12130220/DeploySsrs.zip)
Updated source code is also attached as zip file.
The text was updated successfully, but these errors were encountered: