SSRS - 按日期时间字段的日期部分分组,由 FetchXML 查询产生

SSRS - Group by Date part of a datetime field , resulted from FetchXML query

我是 Fetchxml 的新手,使用 MS CRM Dynamics 2015 On Premise 创建 SSRS 报告使用 Visual Studio 2012

我的 Fetchxml 查询 returns 我的日期时间列 (CreatedOn)

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="fax">
     <attribute name="createdon" />
     <attribute name="documenttype" />
    <attribute name="activityid" />
    <attribute name="statecode" /> 
    <order attribute="createdon" descending="false" />
   </entity>
</fetch>

我想用日期分组(而不是日期时间)。

尝试使用

进行格式化
=Format(createdonValue.value, "dd/MM/yyyy")  

=FormatDateTime(createdonValue.value, DateFormat.ShortDate)

格式化了,但是分组不行。记录重复。

请告诉我是否有任何方法可以仅使用 'FetchXML resulted date value' 的 'Date' 部分进行分组,或者在使用 fetchxml 进行查询时是否只获取 'date' 部分。(例如在另一列中。)

您可以在一个分组中对多个项目进行分组。

设置组使其具有三个条件

=Year(Fields!MyDateTime.Value)

=Month(Fields!MyDateTime.Value)

=Day(Fields!MyDateTime.Value)

您的分组详细信息将如下所示

这是将其应用于日期列的示例

请注意 04/04/01 这两个日期是如何分组的,尽管时间不同。

希望这就是您所需要的。让我知道是否可以提供进一步的帮助。