【问题标题】:CRM 2011 Custom SQL based report error after change default filters更改默认过滤器后 CRM 2011 基于自定义 SQL 的报告错误
【发布时间】:2014-08-02 14:10:25
【问题描述】:

我有一些 SQL 报告(带有预过滤)。 我将此报告导入 CRM (Dynamics CRM 2011) 并运行 - 一切正常。

但是当我在 CRM 中更改此报告的默认过滤器并保存时 - 报告不再运行(报告错误)。 我下载并检查了这两个文件(在更改默认过滤器之前和更改之后),问题是当我更改过滤器时,crm 会在链接实体(xml'join'节点)中插入一些别名,它是 GUID。例如,当我将此别名(在 rdl 文件中)从 GUID 更改为“ab”并将此报告重新导入 CRM 时,它再次起作用 - 直到有人更改默认过滤器...

那我该怎么办?因为现在不可能让用户更改 CRM 中报告的默认过滤器。

编辑: 大部分 .rdl 文件的整个 xml 对于两个报告都是相同的。唯一的区别在于 CustomProperty 节点。在此节点中定义了默认过滤器。

工作报告宽度默认过滤器的部分没有任何更改:

<CustomProperty>
<Name>Custom</Name>
<Value>
<MSCRM xmlns="mscrm">
<ReportFilter>
<ReportEntity paramname="P1">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="sc_accountevents">
<all-attributes />
<filter type="and">
<condition attribute="modifiedon" operator="last-x-days" value="30" />
</filter>
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P2">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="businessunit">
<all-attributes />
<filter type="and">
<condition attribute="modifiedon" operator="last-x-days" value="30" />
</filter>
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P3">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="account">
<all-attributes />
<filter type="and">
<condition attribute="modifiedon" operator="last-x-days" value="30" />
</filter>
</entity>
</fetch>
</ReportEntity>
</ReportFilter>
</MSCRM>
</Value>
</CustomProperty>

损坏报告中的部分(更改默认过滤器后):

<CustomProperty>
<Name>Custom</Name>
<Value>
<MSCRM xmlns="mscrm">
<ReportFilter>
<ReportEntity paramname="P1" displayname="Account Events">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="sc_accountevents">
<all-attributes />
<link-entity name="account" from="accountid" to="sc_klientid" visible="false" link-type="outer" alias="a_58cc568ca7ece311896000155d68d9dc">
<attribute name="sc_jednostkabiznesowaid"/>
</link-entity>
<link-entity name="systemuser" from="systemuserid" to="owninguser" alias="ae">
<filter type="and">
<condition attribute="businessunitid" operator="eq-businessid"/>
</filter>
</link-entity>
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P2" displayname="Jednostki biznesowe">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="businessunit">
<all-attributes />
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P3" displayname="Klienci">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="account">
<all-attributes />
</entity>
</fetch>
</ReportEntity>
</ReportFilter>
</MSCRM>
</Value>
</CustomProperty>

再次使用更改的默认过滤器但在链接实体节点中使用编辑别名的工作报告:

<CustomProperty>
<Name>Custom</Name>
<Value>
<MSCRM xmlns="mscrm">
<ReportFilter>
<ReportEntity paramname="P1" displayname="Account Events">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="sc_accountevents">
<all-attributes />
<link-entity name="account" from="accountid" to="sc_klientid" visible="false" link-type="outer" alias="ab">
<attribute name="sc_jednostkabiznesowaid"/>
</link-entity>
<link-entity name="systemuser" from="systemuserid" to="owninguser" alias="ae">
<filter type="and">
<condition attribute="businessunitid" operator="eq-businessid"/>
</filter>
</link-entity>
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P2" displayname="Jednostki biznesowe">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="businessunit">
<all-attributes />
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P3" displayname="Klienci">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="account">
<all-attributes />
</entity>
</fetch>
</ReportEntity>
</ReportFilter>
</MSCRM>
</Value>
</CustomProperty>

【问题讨论】:

  • 您可以在更改默认过滤器之前和之后发布查询吗?
  • 我在第一篇文章中添加了查询。

标签: sql filter report crm microsoft-dynamics


【解决方案1】:

好的。 可能没有办法用这个做点什么。

这是在汇总 17(2 个月前)中删除的错误...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-20
    • 1970-01-01
    • 1970-01-01
    • 2012-07-09
    • 1970-01-01
    • 2013-06-02
    相关资源
    最近更新 更多