[英]Delete Reports in an SQL Azure Sub-Folder
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 ). Windows Azure的SQL Reporting
组件从旧门户迁移到较新的html 5的过程中,已将文件夹层次结构的深度限制为2级(如本文所述 )。
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. 而Business Intelligence Development Studio仍然允许您部署到子文件夹。
We have preserved our hierarchy like so: 我们这样保留了层次结构:
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. 由于我们拥有大量报告,因此将每个文件夹都置于根级别是不可行的,到目前为止,层次结构仍然可以正常运行。
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. 我们将无法再更新任何数据源或删除深度超过2级的报告。
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? 除了重组我们的所有报告以适应极为严格的结构之外,还有没有办法通过API,BIDS或Powershell管理门户外部的SQL Reporting
报告?
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. Windows Azure上的SQL报表公开了ReportService2010 SOAP接口,用于以编程方式管理报表。
Using a proxy generated through the WSDL tool we can remotely connect to SQL Reporting using the below C# code: 使用通过WSDL工具生成的代理,我们可以使用以下C#代码远程连接到SQL Reporting:
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);
The reportingService
object can then be used to upload, update and delete all items on the SQL Reporting instance. 然后, reportingService
对象可用于上载,更新和删除SQL Reporting实例上的所有项目。 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: 例如,如果我想删除Windows Azure门户上无法访问的子文件夹中的报告,则可以使用:
reportingService.DeleteItem("Internal Reports/Report Category 1/Report1.rdl");
That stated; 那说; it is much easier to refactor the report folders to a 2 level hierarchy instead. 将报表文件夹重构为2级层次结构要容易得多。 The naming convention we ended up using is: 我们最终使用的命名约定是:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.