locked
Programmatically get Report CustomProperties in my .NET application RRS feed

  • Question

  • Hello,

    I have a .NET application, developed in C#  that has to display all the reports contained in the MS Report Server.

    I created code that correctly displays everything but I cannot get the CustomProperty defined, for every Report, directly in the Report Server GUI.

    I use the SOAP Client to retrieve the List of Reports, represented in the server as CatalogItem objects. In order to get the CustomProperty TreeFolder, I use the GetProperties function in order to get the Custom Properties (as suggested but not explained, by this article http://technet.microsoft.com/en-us/library/aa275243%28v=sql.80%29.aspx) as follows:

    ReportingService2010SoapClient _client; _client = new ReportingService2010SoapClient(); //Set credentials CatalogItem[] items = null; _client.ListChildren(null, Settings.ReportingServicesCypherReportsFolder(), true, out items); List<CatalogItem> reports = items.Where(i => i.TypeName.ToUpper() == "REPORT").ToList(); foreach (CatalogItem catalogItem in reports) { Property[] requestedProperties; requestedProperties = new Property[] { new Property { Name = "TreeFolder" }, new Property { Name = "Custom" }, new Property { Name = "CustomProperties" }, new Property { Name = "CustomProperty" }, new Property { Name = "ID" } }; Property[] values;

    _client.GetProperties(new ItemNamespaceHeader(), null, catalogItem.Path, requestedProperties, out values);

    //Other Code

    }

    In the values array I just have the correct Property ID, therefore the code is correct but it is not able to retrieve the Custom Properties. There is almost no documentation on the web, can anybody help?
    Friday, April 4, 2014 9:54 AM