Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Output of SSRS in XML format Expand / Collapse
Author
Message
Posted Monday, May 6, 2013 12:50 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 7:34 AM
Points: 299, Visits: 498
Hi,

I got my sp TO WORK.. FINANLLY...

Now I wanted to schedule the report to run and email in XML format....

I want the remove some of below
and change the name of the tags from say Detail_Name to Name


Thanks
<?xml version="1.0" encoding="utf-8" ?>
- <Report xsi:schemaLocation="XML_test http://ucrpt01/ReportServer?%2FTest%2FXML_test&rs%3AFormat=XML&rs%3ASnapshot%3Aisnull=True&rc%3ASchema=True" Name="XML_test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="XML_test">
<table1 />
</Report>
Post #1449844
Posted Monday, May 6, 2013 1:10 PM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Monday, September 8, 2014 12:31 PM
Points: 1,480, Visits: 1,029
Check out the DataElementName Property for each text box.
They are set to Auto by Default, Change the name here.

Nevermind, Didn't read your question. Hold Please

No I was right, Clicking on the Table, you can set this property.
By changing the names of the Row Groups it will change the element names.
and by changing this property on each textbox will control the element name.
Post #1449850
Posted Monday, May 6, 2013 1:17 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 7:34 AM
Points: 299, Visits: 498
Hi Ray

Sorry I really didn't work it correctly

What I really want is just the data on the output

with tags

<name>joe</name>

with no other stuff.......

If I could get it vertical even better(I Think)
<name>joe</name>
<name>mary</name>
etc..
Post #1449851
Posted Monday, May 6, 2013 1:18 PM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Monday, September 8, 2014 12:31 PM
Points: 1,480, Visits: 1,029
jbalbo (5/6/2013)
Hi Ray

Sorry I really didn't work it correctly

What I really want is just the data on the output

with tags

<name>joe</name>

with no other stuff.......

If I could get it vertical even better(I Think)
<name>joe</name>
<name>mary</name>
etc..

Click off the report (In the Yellow) then look at that property and change the DataElement Style from Auto to Element
Post #1449853
Posted Monday, May 6, 2013 1:33 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 7:34 AM
Points: 299, Visits: 498
I don't seem to have that option...
I RC > report Properties .. I have PAge Setup, Code References and Variables
Post #1449860
Posted Monday, May 6, 2013 1:39 PM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Monday, September 8, 2014 12:31 PM
Points: 1,480, Visits: 1,029
In the properties Pane.
Left Click any part of the Yellow.
Look at the properties pane.
The Data only Section.
See image.
That will make all items element centric.
and you can control individual items by clicking on the Textbox they come from and change from Auto to Attribute, or Element.


  Post Attachments 
Image 9.jpg (18 views, 62.83 KB)
Post #1449861
Posted Monday, May 6, 2013 1:51 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 7:34 AM
Points: 299, Visits: 498
Thanks Ray...

I feel dumb.. I never use the property window........

I'm going to be back with more dumb questions about this.... soon

While I'm here is there a way to surpress the top line?
<?xml version="1.0" encoding="utf-8" ?>
- <Report xsi:schemaLocation="XML_test http://reportserver?%2FXML_test&rs%3AFormat=XML&rc%3ASchema=True" Name="XML_test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="XML_test">


Thanks again
Post #1449864
Posted Monday, May 6, 2013 3:11 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 7:34 AM
Points: 299, Visits: 498
Can I Rename the <Detail> section?

Thanks
Post #1449899
Posted Tuesday, May 7, 2013 9:16 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Monday, September 8, 2014 12:31 PM
Points: 1,480, Visits: 1,029
Yeah,
See image.
In the row groups section, RightClick -> Group Properties. Change the name to what you want.


  Post Attachments 
Image 11.jpg (13 views, 20.15 KB)
Post #1450210
Posted Tuesday, May 7, 2013 7:07 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 6:51 AM
Points: 460, Visits: 863
While I'm here is there a way to surpress the top line?
<?xml version="1.0" encoding="utf-8" ?>
- <Report xsi:schemaLocation="XML_test http://reportserver?%2FXML_test&rs%3AFormat=XML&rc%3ASchema=True" Name="XML_test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="XML_test">


I don't think you should remove that.
Those lines are required as part of the XML standard.
The first part is declaring that the document is supposed to conform to the XML 1.0 standard. (whether it actually conforms or not is a separate issue).

The second part informs any XML parsing/reading application what schema to use to interpret the XML.
XML as a format is essentially designed so that you can make up your own tags. However, that requires an XML schema document that describes what all the tags are and how to interpret them, i.e. how to read the XML file.

All of this depends on what you plan to do with the XML file. If you are planning to send it to another application that will import it into another system then I would suggest you leave it. You also shouldn't worry about the formatting (you mentioned having the records "vertical") because an XML importer shouldn't care about that.

If on the other hand you are sending this to a person for them to read then I suggest XML is not the right format. It's not particularly friendly for humans to read.

Post #1450383
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse