CRM 2011 Fetchxml report how to view all attribute results with a filter to show particular attribute RRS feed

  • Question

  • Hey,


    This is my Fetchxml I had to fetch all the attributes info when I click on the View Report button and also I need to show only particular attribute when given in the text box for example if I have give event name in the text box it should show only that event details and when the user doesn't give any value in the text box and click on the view report button it should show all the attribute details. I tried to give allow null values in the parameter properties but it's not fetching any info how do i resolve this problem.

    Thanks, For any help

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
      <entity name="oems_eventregistration">
        <attribute name="oems_registrationnumber" />
        <attribute name="oems_event" />
        <attribute name="oems_eventregistrationid" />
        <attribute name="oems_womanflag" />
        <attribute name="oems_username" />
        <attribute name="oems_racialminorityflag" />
        <attribute name="oems_lesbiangaybisexualtransgenderflag" />
        <attribute name="oems_lastname" />
        <attribute name="oems_firstname" />
        <attribute name="oems_disabledflag" />
        <attribute name="oems_aboriginalflag" />
        <order attribute="oems_event" descending="false" />
        <link-entity name="account" from="accountid" to="oems_account" visible="false" link-type="outer" alias="a_f6387709ab58e31194a4000c29675537">
          <attribute name="oems_etfomemberid" />
    <filter type="and">
         <condition attribute="oems_eventname" operator="eq" value="@oems_event" />
    Tuesday, June 16, 2015 5:49 PM


  • I think you need to set the parameter, @oems_event to "%" if the user doesn't select an event. % is a wildcard character in FetchXML (like SQL).

    • Marked as answer by Hemanth555 Friday, January 22, 2016 2:52 PM
    Wednesday, June 17, 2015 2:26 PM