Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve carriage return and indenting in deployed rdl file #84

Open
mayur-bhawar opened this issue Jul 21, 2023 · 1 comment
Open

Preserve carriage return and indenting in deployed rdl file #84

mayur-bhawar opened this issue Jul 21, 2023 · 1 comment

Comments

@mayur-bhawar
Copy link

mayur-bhawar commented Jul 21, 2023

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.

@mayur-bhawar
Copy link
Author

@mmajcica, I have created PR to fix xml formatting issue. Could you please review and approve PR #85 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant