Get Sql Server Reporting Services report descripti

2019-09-05 05:41发布

I have an ASP.NET web page with a ReportViewer control that dynamically loads a report based on the URL and I want to set the DisplayName for the report from code as well. This name is used as the suggested file name whenever someone exports the report to a file.

Now I'd like to use the report description (which is baked in the report file when it's deployed on Reporting Services) for that name but I don't find a way to retrieve that (other than parsing the XML. I guess this should be possible through the ReportViewer control as well.

Ultimately I could also use the value from a TextBox (generated by an expression) in the report (if I rename it consistently over all reports).

Anyone knows how to get either of those values?

1条回答
劫难
2楼-- · 2019-09-05 06:29

It's a property of the catalog item from the SSRS web service endpoint. You'll need to add a web reference to the ReportService2010 wsdl, and then you'll be able to get a list of CatalogItems. Each of those will have a Description property. Note that this can only be set programatically or via the SSRS management interface, it can't be set in BIDS.

http://msdn.microsoft.com/en-us/library/reportservice2010.catalogitem.description

查看更多
登录 后发表回答