我是创建自定义报告的新手。我需要在crm中向用户提示开始日期和结束日期,以便结果将是仅在这两个日期之间创建的数据。
我有三个参数来预过滤我的数据(帐户,事件,合同),并在Visual Studio中添加了两个日期参数。
但是现在我几乎被卡住了......
任何帮助都会很棒!
编辑1:这是我的查询FETCH Xml的片段:
<?xml version="1.0"?><fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0">
<entity name="incident" enableprefiltering="1">
<attribute name="overriddencreatedon"/>
<attribute name="new_dateclotureincident"/>
<attribute name="title"/><attribute name="createdon"/>
<attribute name="new_travaileffectue"/>
<attribute name="ticketnumber" />
<attribute name="new_dureecumuleeactivites"/>
<order descending="true" attribute="createdon"/>
<filter type="and">
<condition attribute="createdon" value="@Date-Debut" operator="on-or-after"/>
<condition attribute="createdon" value="@Date_Fin" operator="on-or-before"/>
</filter>
<link-entity name="new_contrats" alias="aa" to="new_contrat" from="new_contratsid" enableprefiltering="1">
<attribute name="new_referencecontrat"/>
</link-entity>
<link-entity name="new_lignecontrat" alias="ab" to="new_lignecontrat" from="new_lignecontratid">
<attribute name="new_unitesrestantes"/><attribute name="new_unitesrestantes"/>
</link-entity>
<link-entity name="account" alias="ac" to="customerid" from="accountid" enableprefiltering="1"><attribute name="name"/>
</link-entity></entity></fetch>
在执行报告时会提示日期没有问题,但是在我选择数据后数据没有正确排序。我刚刚创建了两个简单的日期参数,所以我做错了什么?
答案 0 :(得分:3)
问题解决了!
简单的日期格式问题。
将日期格式表达式与我的参数相关联后,它可以完美运行!
=Format(Parameters!YourDateParameterName.value,"yyyy-MM-dd")