Managed Metadata in Report Builder

    General discussion

  • hi

    Is it possible to use managed metadata as a parameter in report builder 3.0?


    Saturday, September 13, 2014 6:57 AM

All replies

  • your question can be divided into two parts:

    1. get a dataset from managed medata service termset

    2. filter the report list with managed metadata field

    For part 1, the only relevent data source type i found in report builder is XML . But i don't know how to call MetadataWebService.svc. I can create a custom WCF web service on SharePoint managed metadata server object model for this.

    For part 2, I tried and find report builder query designer generated CAML is not so good for managed metadata field, allthough i think it will work. you might modify the CAML in DataSet query text

    Tuesday, November 3, 2015 7:20 AM
  • for part 1 of question, an alternative seems to be SPList.GetDistinctFieldValues , however, the document says its obsolete and my test in PowerShell with TaxonomyField type get the "This field type does not support selection of distinct values".

    But, getting terms from TermSet directly really does not seem so accurate, because for a TaxonomyField definition, the choice values does not always show every term in the termset, it can start from a specified term in hierarchy. So, retrieving the terms according to field definition and wrap the method as web service looks better.

    Another alternative is to retrieve from the TaxonomyHiddenList for items from a specific termset, join this results with the terms we get according to field definition will be the terms we expect with SPList.GetDistinctFieldValues. (Update: this is not correct, the result terms can still be those used by other taxonomy field in the same site collection binding to the same termset)(Update:if you can restrict the implementation that every site collection has only one taxonomyfield using that termset, GetDistinctFieldValue will be as simple as retrieving from TaxonomyHiddenList.)

    Update: I tried editing a list item with TaxonomyField in browser, and with fiddler, i found that method such as /_vti_bin/taxonomyinternalservice.json/GetChildTermsInTermSetWithPaging was called, but the returned data are in JSON instead of XML.

    In Word Desktop application, you can edit document item TaxonomyField property in File->Info->Properties with a pickup dialog, i can see fiddler web service call /_vti_bin/TaxonomyClientService.asmx , GetTermSets in soap:Body, but that does not explain how Word pickup dialog knows from which term to display the hierarchy, instead of showing all terms in the termset

    (Update:in fiddler, there are many calls to /_vti_bin/CellStorage.svc, which expose class in stssoap.dll as web service, i cannot read the detail of message, but guess it has something to do with Word Application getting the TaxonomyField definition from list schema. Anyway, there seems to be no single web service which get a parameter of a TaxonomyField and return a collection of terms in XML, which justifies developing a custom one)

    Wednesday, November 4, 2015 7:19 AM
  • I just created a project in codeplex for this: .

    First, we have a SharePoint hosted custom WCF web service, you can call the web service with two parameters: The URL of the List where the TaxonomyField is used, for example: http://yourservername/sitename/pages , and the name of the TaxonomyField, for example "Wiki Categories".

    And we create a data source pointing to this WCF web service:

    And a reporting service dataset that use a query on the data source above:

     <Method Namespace="TaxonomyFieldValues" Name="GetFieldValues" >
         <Parameter Name="ListAbsoluteUrl">
         <Parameter Name="FieldName">
                 <DefaultValue>Wiki Categories</DefaultValue>
        <ElementPath IgnoreNamespaces="True">

    For reference of query syntax:

    Wednesday, December 2, 2015 8:35 AM