We help IT Professionals succeed at work.
Get Started

SSRS Change XML Data Tags in Report Output

KANEDA 0149
KANEDA 0149 asked
on
1,278 Views
Last Modified: 2014-05-30
I have created a report from a stored procedure query that works fine.  This report is published to our report server and the 2nd piece I would like to incorporate is the option to export completed report as an XML format.

The challenge is change the XML tags to something custom.  In the screenshot shown below, this is the XML output from my SSRS report but I need it in the 2nd screenshot shown just below it.  I have also attached the 2 different XML samples.

For example;
» change <Report xsl:schemaLocation...> to <Bonaire> (hardcoded)
» change <table2> to <RevportHeader FileDate=...> (hardcoded)
» change <Detail Collection> to <RevportBody DataType="AccountData"> (hardcoded)
» change <Detail> to <AccountData> (hardcoded)
» change </Detail_Collection> to </RevportBody> (hardcoded)
» change </table2> to <RevportTrailer DataType="AccountData" RecordCount="13"> (hardcoded except the record count, that would be dynamic based on the number of rows from the report)
» lastly change </Report> to </Bonaire>

Example screenshot of XML filesXML-SSRS-Output.xml
XML-Expected-Output.xml
Comment
Watch Question
Data Engineer
Top Expert 2014
Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE