【问题标题】:Pass expression as parameter to Dataset in SSRS将表达式作为参数传递给 SSRS 中的数据集
【发布时间】:2019-03-07 09:53:02
【问题描述】:

在 FetchXml 查询中,我将结束日期作为参数传递,但对于开始日期,参数基于用户选择。例如,用户可以选择 MTD、QTD 和 YTD 作为报告时间。因此,如果用户选择 QTD 作为开始日期,而结束日期选择 2 月的某个日期,例如 25 日。所以我需要提取从季度开始到结束日期的选定日期创建的记录。

我可以做什么我制作参数,但它的值在某种意义上是固定的,如果用户有兴趣选择去年的日期形式。

解决方法是使用文本框并根据开始日期和选定值进行排序,并将这个新表达式作为参数传递给数据集。

这些只是假设,我想听听专家来解决这个问题。

下面是我的 FetchXml 查询:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" >
    <entity name="account" >
        <attribute name="name" />
        <attribute name="address1_telephone1" />
        <attribute name="fax" />
        <attribute name="accountid" />
        <order attribute="fullname" descending="false" />
        <filter type="and" >
            <condition attribute="createdon" operator="on-or-after" value="" />
            <condition attribute="createdon" operator="on-or-before" value="" />
        </filter>
    </entity>
</fetch>

【问题讨论】:

    标签: reporting-services dynamics-crm fetchxml


    【解决方案1】:

    您可以为每种查询类型使用特定的FetchXML Operators

    MTD:this-month
    QTD:this-fiscal-period
    年初至今:this-year

    例如:

    <filter type="and" >
        <condition attribute="createdon" operator="this-month" />
    </filter>
    

    【讨论】:

      猜你喜欢
      • 2014-11-07
      • 2015-06-09
      • 1970-01-01
      • 1970-01-01
      • 2016-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多