How to put multiple values within a fetchXML condition through parameters in Reporting Services.



  • If you need to use dynamic multiple value parameters in a fetch condition the correct syntax would be something like this:
     

    <filter type="and">

    <condition attribute="code" operator="in" value="@Code" />

    <condition attribute="productname" operator="in" value="@ProductName" />

    </filter>
     

    @Code and @ProductName are multiple value parameters.
     

    Or maybe you want to do this manually. In that case the syntax would be:
     

    <fetch mapping='logical'>

    <entity name='product'>

    <filter type="and">

    <condition attribute="code" operator="in" >

        <value>111</value>

        <value>222</value>

        <value>333</value>

    </condition>

    </filter>

    </entity>
    </fetch>
     

    The values were invented for the example.



  • Comments



Add a Comment