locked
Dataset is not populated with fields when XML query contains XML coming from DB table RRS feed

  • Question

  • Hello all,

    I created a parameter XML_PARAM whose value is retrieved from a database table (containing XML strings). After that I tried to create a dataset with an XML query like this:

    ="<Query><XmlData>" & Parameters!XML_PARAM.Value & "</XmlData></Query>"

    However, the dataset is not populated with fields. Now the questions are,

    1. Is it even possible to have a dataset populated with fields in this way?

    2. If not, an acceptable solution is also to hardcode fields which I am sure are present in the XML. But what would be the expression for such an expected field?

    Thanks for any input

    Tuesday, December 18, 2018 1:58 PM

All replies

  • Hi Kristof Anetta

    Sorry for not clear about your requirement . From your description ,you put the parameter in the middle of the   "<Query><XmlData>” tag,right?

    Seems the middle part of the "<Query><XmlData>” is the xml data ,not the select element .

    What the parameter value like in your report?

    If you put the parameter value hard coded in the "<Query><XmlData>” tag ,does it works or not ?

    You could see the below links for more detailed information about how to pass parameter to the xml query :

    Pass a parameter value to a Dataset Parameter in SSRS 2008

    Hope it can help you.

    Best Regards,

    Eric Liu


    Best Regards, Eric Liu MSDN Community Support Please remember to click Mark as Answer if the responses that resolved your issue, and to click Unmark as Answer if not. This can be beneficial to other community members reading this thread.

    • Proposed as answer by Mitarai Queen Tuesday, December 25, 2018 5:27 AM
    Wednesday, December 19, 2018 3:12 AM