ssrs-2008 - 定义日期参数

标签 ssrs-2008 dynamics-crm-2011 fetchxml

我对创建自定义报告非常陌生。我需要在 crm 中向用户提示开始日期和结束日期,以便结果是仅在这两个日期之间创建的数据。

我使用三个参数来预过滤我的数据(帐户、事件、契约(Contract)),并在 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>

在执行报告时,日期提示没有问题,但在我选择数据后,数据排序不正确。我刚刚创建了两个简单的日期参数,那么我做错了什么?

最佳答案

问题解决了!

简单的日期格式问题。

将日期格式表达式与我的参数关联起来后,它完美地工作了!

=Format(Parameters!YourDateParameterName.value,"yyyy-MM-dd")

关于ssrs-2008 - 定义日期参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10914185/

相关文章:

tsql - 转换Varchar成Ascii

reporting-services - 在 SSRS 中使用可见性和切换时出现额外的空行

c# - CRM 2011 插件 - PostTaskSetState

dynamics-crm-2011 - FetchXML 获取第二个关系实体

ssrs-2008 - 如何减小 SSRS PDF 导出大小

javascript - 当字段已由 JavaScript 设置时,CRM 2011 onChange 事件处理程序未触发

javascript - 更改javascript中查找字段的数据记录类型

javascript - 我如何为 CRM 2011 UR 12 重新制作 FetchUtil.js

reporting-services - 在报告服务上从字符串转换日期时间时转换失败