Wednesday, March 21, 2012

Displaying xml with xslt in RS

Hi,

I've got an xml and an xslt - I want to get that into reporting services. Right now I have a link to the xml file in a 'report', which will open it correctly and format with the xslt. I'd like it to display without going to an external link.

I know how to use an xml datasource, but I need the xslt applied, since it has some nice formatting in it - so i don't think that will work.

I'm trying to report on the results of a scripted ms baseline security analyzer of several servers - the style sheet lets you drill down and has links to the base reports.

Thanks for your help.

There is a way to apply xslt "automagically" in a report definition (check the Data Output tab of the Report Properties dialog) , although unfortunately you would probably have to rework your xslt a bit to use it. The reason is that the xml it is going to be applied to is the data XML of the report itself. You either need to define a report that will supply exactly the xml that you currently have as its data result, or you need to change the XSLT to fit the data xml you *will* get from some report.

The key point heres are "from some report" and "data output of a report". You can't just take any xslt result and display it within a ReportViewer interface. Is that what you are trying to do?

Note that it *is* possible to upload arbitrary files to Report Manager and then link to them, I think. But that's not the same thing as displaying those files within a reportviewer control interface.

>L<

|||

"Note that it *is* possible to upload arbitrary files to Report Manager and then link to them, I think. But that's not the same thing as displaying those files within a reportviewer control interface."

Yes, that sounds like it would be what I'm after - I really just need it there because all of our other reports are there, not because of any RS functionality. Now if I only knew the technical term for this to find it in the manual, I'd be set.

"You either need to define a report that will supply exactly the xml that you currently have as its data result"

Seems like this could work too - I'll have to look into it.

Thanks for your help Lisa.

|||

>>Yes, that sounds like it would be what I'm after - I really just need it there because all of our other reports are there, not because of any RS functionality. Now if I only knew the technical term for this to find it in the manual, I'd be set.

<rofl> Well I don't know the techical term but I can tell you that you upload the file using a button in the Report Manager that says... wait for it... Upload File. You give it a title, it becomes a browseable item in the Report manager interface (unless of course you mark it "hide in list view"), etc.

You can do it programmatically as well, you might want to look at this http://www.sqldbatips.com/showarticle.asp?ID=62 or you can probably use the SOAP API for this as well.

>L<

No comments:

Post a Comment