删除在SQL Azure的子文件夹报表 [英] Delete Reports in an SQL Azure Sub-Folder
问题描述
Windows Azure中的 SQL报告
组件从旧的门户网站到新的HTML 5人有在这个过程中的迁移限制文件夹层次结构为2级深(截至在这篇文章 所示)。
The migration of the SQL Reporting
component of Windows Azure from the old portal to the newer html 5 one has in the process limited the folder hierarchy to 2 levels deep (As indicated in this article).
不过,本文然而,国家现有的报告服务仍然可以有更深的层次;而商业智能开发套件还允许您部署到子文件夹中。
The article does however state that existing reporting services can still have deeper hierarchies; whilst Business Intelligence Development Studio still allows you to deploy to the sub folder.
我们有preserved我们的层次结构像这样:
We have preserved our hierarchy like so:
- 根级别
- 客户报告
- 内部报告
- 报告类别1
- 数据源
- Report1.rdl
- Report2.rdl
由于我们有它是不可行的具有根级别和每个文件夹,迄今为止,在层次结构仍然可以正常报告的数目。
Due to the number of reports we have it is unfeasible to have every folder at root level and, thus far, the hierarchy has still be functioning correctly.
然而,我们遇到了一个问题;我们不能再更新任何数据源或删除报告是超过2级。
However we have run into a problem; we can no longer update any data sources or delete reports that are more than 2 levels deep.
而不是重组我们的所有报告,以满足感觉像是一个非常严格的结构,有管理的一种方式我们
SQL报告
报告外部的门户网站,通过任何一API,投标或PowerShell的?Rather than restructure all our reports to suit what feels like an extremely restrictive structure, is there a way of managing our
SQL Reporting
reports external to the portal, via either an API, BIDS or Powershell?推荐答案
行,所以我已经做了一些研究到这个; SQL报告在Windows Azure上公开 ReportService2010 SOAP接口以编程方式管理报告
OK so I've done a bit of research into this; SQL Reporting on Windows Azure exposes the ReportService2010 SOAP interface for administering the reports programmatically.
使用通过生成的代理WSDL工具我们可以使用下面的C#code远程连接到SQL报告:
Using a proxy generated through the WSDL tool we can remotely connect to SQL Reporting using the below C# code:
var reportServiceUrl = "https://X.reporting.windows.net/reportserver/reportservice2010.asmx?wsdl"; var serviceUsername = "AdminUserName; var servicePassword = "AdminPassword"; var reportingService = new ReportingService2010 { Url = reportServiceUrl, CookieContainer = new CookieContainer() }; reportingService.LogonUser(serviceUsername, servicePassword, reportServiceUrl);
的
reportingService
对象可以被用来上传,更新和删除的SQL报告实例的所有项目。如果,例如,我想删除无法在Windows Azure的门户网站访问的子文件的报告,我可以使用:The
reportingService
object can then be used to upload, update and delete all items on the SQL Reporting instance. If, for example, I wanted to delete a report in a sub folder that cannot be accessed on the Windows Azure portal, I could use:reportingService.DeleteItem("Internal Reports/Report Category 1/Report1.rdl");
这说明;这是一个2级的层次结构,而不是更容易重构的报告文件夹。我们最后使用的命名规则是:
That stated; it is much easier to refactor the report folders to a 2 level hierarchy instead. The naming convention we ended up using is:
- 根级别
- 内部报告 - 报告第1类
- 数据源
- Report1.rdl
- Report2.rdl
这篇关于删除在SQL Azure的子文件夹报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
- 内部报告 - 报告第1类
- 报告类别1