Monday, March 12, 2012

Mimic SQL Server Management Studio behavior inside RS Report

I want to know how to mimic the SSMS behavior inside an Reporting Services report when querying an XML field.

In SSMS, a field that is XML shows up as a link, and when the use clicks on the XML, it opens then entire XML document in a new window. I need this exact behavior in RS, but can't accomplish it.

Any smart people out there who can do this?

You would need to use a drillthrough or hyperlink action in the report. You could pass the value of the XML to the target URL.|||

Brian, thats the part that I dont understand. The target isn't in a file- it's in a field in the database. So, with one hyperlink action how do I extract the data, and present it in another IE window, formatted as XML (i.e. indentation, Expand/collapse nodes functionality, etc. like in IE or SSMS)

You say "pass the value of the XML". How do I construnct the hyperlink to do that? Just assign the field to the Drill to URL action? That seems to easy, but I'll give it a shot...

-Kory

|||

I didn't realize you were trying to get an interactive representation of the XML. You can't really accomplish what you want in a report as we don't deal with XML data hierarchically - the XML data extension will flatten it and the binding it into a textbox will simply display the string. (Native XML support is in the long term plans)

So, if you want an interactive view, I would create an ASPX page that took the XML data as a parameter and displayed the HTML then create a URL action to point to the page.

No comments:

Post a Comment