SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Output of SSRS in XML format


Output of SSRS in XML format

Author
Message
jbalbo
jbalbo
SSChasing Mays
SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)

Group: General Forum Members
Points: 623 Visits: 668
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>
Ray M
Ray M
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2217 Visits: 1076
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.
jbalbo
jbalbo
SSChasing Mays
SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)

Group: General Forum Members
Points: 623 Visits: 668
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..
Ray M
Ray M
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2217 Visits: 1076
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
jbalbo
jbalbo
SSChasing Mays
SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)

Group: General Forum Members
Points: 623 Visits: 668
I don't seem to have that option...
I RC > report Properties .. I have PAge Setup, Code References and Variables
Ray M
Ray M
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2217 Visits: 1076
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.
Attachments
Image 9.jpg (87 views, 62.00 KB)
jbalbo
jbalbo
SSChasing Mays
SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)

Group: General Forum Members
Points: 623 Visits: 668
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
jbalbo
jbalbo
SSChasing Mays
SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)SSChasing Mays (623 reputation)

Group: General Forum Members
Points: 623 Visits: 668
Can I Rename the <Detail> section?

Thanks
Ray M
Ray M
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2217 Visits: 1076
Yeah,
See image.
In the row groups section, RightClick -> Group Properties. Change the name to what you want.
Attachments
Image 11.jpg (70 views, 20.00 KB)
davoscollective
davoscollective
SSC Eights!
SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)SSC Eights! (941 reputation)

Group: General Forum Members
Points: 941 Visits: 1004
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search