locked
How to pass multiple parameters to fetch xml base reports. RRS feed

  • Question

  • Dear All,

    I have created query from advance find control and downloaded the fetch xml and done some change in that to pass the multiple parameters from reports. But it giving an error as mentioned below.

    "The fetch xml parameter "@" cannot obtain multiple values. change the parameter "@" to a single value parameter , and try again"

    Kindly help me. How to use in operator in fetch xml base reports.

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
      <entity name="new_businessresult">
        <attribute name="new_businessresultid" />
        <attribute name="new_name" />
        <attribute name="new_year" />
        <attribute name="new_salesgroupid" />
        <attribute name="new_plansalesunit" />
        <attribute name="new_plansalesquantitiy" />
        <attribute name="new_planrevenue_base" />
        <attribute name="new_planrevenue" />
        <attribute name="new_month" />
        <attribute name="exchangerate" />
        <attribute name="new_divisionid" />
        <attribute name="new_customernumberid" />
        <attribute name="transactioncurrencyid" />
        <attribute name="new_calenderyearmonth" />
        <attribute name="new_applicationcateogoryid" />
        <attribute name="new_actualsalesunit" />
        <attribute name="new_actualsalesquantitiy" />
        <attribute name="new_actualrevenue_base" />
        <attribute name="new_actualrevenue" />
        <order attribute="new_name" descending="false" />
        <link-entity name="systemuser" from="systemuserid" to="new_salesgroupid" visible="false" link-type="outer" alias="a_3f12676a7371e411aa04d89d6765128c">
          <attribute name="new_salesofficeid" />
          <attribute name="fullname" />
          <attribute name="new_company" />
        </link-entity>
        <link-entity name="account" from="accountid" to="new_customernumberid" alias="a_9e6a547b6f71e411aa04d89d6765128c">
          <attribute name="accountnumber" />
          <attribute name="new_keyregion" />
          <attribute name="name" />
          <attribute name="new_keycustomergroupid" />
          <attribute name="new_salesorganisationid" />
          <filter type="and">
            <condition attribute="new_keycustomergroupid" operator="in">
             <value>@CustomerGroup</value>
            </condition>
          </filter>
          <link-entity name="territory" from="territoryid" to="new_keyregion" alias="ac">
            <filter type="and">
              <condition attribute="territoryid" operator="in">
                <value>@dsRegion</value>
              </condition>
            </filter>
            <link-entity name="new_salesorganisation" from="new_keyregionid" to="territoryid" alias="ad">
              <filter type="and">
                <condition attribute="new_salesorganisationid" operator="in">
                  <value>@SalesOrganization</value>
                </condition>
              </filter>
            </link-entity>
          </link-entity>
        </link-entity>
      </entity>
    </fetch>

    Thanks & Regards,

    Mohammad Sharique


    Thursday, December 11, 2014 10:54 AM

All replies

  • Hi,

    The attribute which you are going make it as second parameter, only with that attribute you can download another fetch XML and you could attach another data set to the same report.

    You first data set will have first parameter

    and the second will have second parameter.

    or u could use something like this:

    <condition attribute="createdon" operator="on-or-after" value="@From" />
     <condition attribute="createdon" operator="on-or-before" value="@To" />

    *From and To are already created parameters.

    Regards,

    Rekha.J


    • Edited by Rekha J Thursday, December 11, 2014 1:07 PM
    Thursday, December 11, 2014 1:00 PM
  • Replace following like code:

    <condition attribute="new_keycustomergroupid" operator="in">
             <value>@CustomerGroup</value>
    </condition>

    with

    <condition attribute="new_keycustomergroupid" operator="in" value="@CustomerGroup" />

    Hopefully this will solve your problem.

    Friday, December 12, 2014 7:14 AM