[英]Pass expression as parameter to Dataset in SSRS
在FetchXml查询中,我将结束日期作为参数传递,但是对于“开始日期”,该参数基于用户选择。 例如,用户可以选择MTD,QTD和YTD作为报告时间。 因此,如果用户选择QTD作为开始日期,而End Date是选择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>
您可以为每种查询类型使用特定的FetchXML运算符 :
MTD: this-month
QTD: this-fiscal-period
年初至今: this-year
例如:
<filter type="and" >
<condition attribute="createdon" operator="this-month" />
</filter>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.