2

I am using FetchXML in SSRS 2008 to create a report from CRM 2011. I want to have parameters in the report so you can show the records between From Date - To Date. This is the Query I have so far.

<fetch>
      <entity name="appointment">
        <attribute name="scheduledstart" />
        <link-entity name="systemuser" from="systemuserid" to="ownerid">
            <attribute name="firstname" alias="ownerFirstName" />
            <attribute name="lastname" alias="ownerLastName" />
        </link-entity>
        <link-entity name="contact" from="contactid" to="new_contactperson">
            <attribute name="parentcustomerid" alias="parentaccount" />
            <attribute name="new_businessunit" alias="businessunit" />
        </link-entity>
        <attribute name="new_contactperson" />
        <attribute name="subject" />
        <attribute name="new_coldernotes" />
    <link-entity name="activityparty" from="activityid" to="activityid">
    <attribute name="participationtypemask" alias="participationtypemask" />
        <filter>
        <condition attribute="participationtypemask" operator="eq" value="9" />
        </filter>
        <link-entity name="systemuser" from="systemuserid" to="partyid">
            <attribute name="fullname" />
        </link-entity>
    </link-entity>
    <order attribute="scheduledstart" descending="true" />
      </entity>
</fetch>

How would I make it so I can filter between the dates?

Thanks!

4

1 回答 1

5

不确定您是否有权访问本机 CRM 客户端,但 Advanced Find 视图会快速生成此示例 FetchXML:

<filter type="and">
  <condition attribute="modifiedon" operator="on-or-after" value="2011-10-04" />
  <condition attribute="modifiedon" operator="on-or-before" value="2011-11-13" />
</filter>
于 2011-11-14T17:06:14.367 回答