Xml Dynamics CRM 2011创建自定义报告

Xml Dynamics CRM 2011创建自定义报告,xml,crm,bids,microsoft-dynamics,Xml,Crm,Bids,Microsoft Dynamics,我正在尝试使用BIDS创建一些自定义报告。我的概念证明是使用quote实体 我使用以下FetchXML创建了一个子报告: <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"> <entity name="quotedetail"> <attribute name="productid" /> <attribute name="produc

我正在尝试使用BIDS创建一些自定义报告。我的概念证明是使用quote实体

我使用以下FetchXML创建了一个子报告:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="quotedetail">
<attribute name="productid" />
<attribute name="productdescription" />
<attribute name="priceperunit" />
<attribute name="quantity" />
<attribute name="extendedamount" />
<attribute name="quotedetailid" />
<attribute name="isproductoverridden" />
<order attribute="productid" descending="false" />
<link-entity name="quote" from="quoteid" to="quoteid" alias="aa">
<filter type="and">
<condition attribute="quotenumber" operator="eq" value="@quoteid" />
</filter>
</link-entity>
</entity>
</fetch>
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="quote" enableprefiltering="1" prefilterparametername="CRM_FilteredQuote">
<attribute name="name" />
<attribute name="totalamount" />
<attribute name="quoteid" />
<order attribute="name" descending="false" />
</entity>
</fetch>

当在运行时提供quoteid参数时,这就起作用了。 然后,我使用以下FetchXML创建了主报告:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="quotedetail">
<attribute name="productid" />
<attribute name="productdescription" />
<attribute name="priceperunit" />
<attribute name="quantity" />
<attribute name="extendedamount" />
<attribute name="quotedetailid" />
<attribute name="isproductoverridden" />
<order attribute="productid" descending="false" />
<link-entity name="quote" from="quoteid" to="quoteid" alias="aa">
<filter type="and">
<condition attribute="quotenumber" operator="eq" value="@quoteid" />
</filter>
</link-entity>
</entity>
</fetch>
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="quote" enableprefiltering="1" prefilterparametername="CRM_FilteredQuote">
<attribute name="name" />
<attribute name="totalamount" />
<attribute name="quoteid" />
<order attribute="name" descending="false" />
</entity>
</fetch>

我得到了quote id提示,当我输入时,我得到以下错误:

本地报表处理过程中出错。 报表处理过程中发生错误。 无法读取dataset DataSet1的下一个数据行。 传递到平台的XML不是格式良好的XML。 无效的XML


我读过很多博客和文章,尝试过很多关于过滤器和前置过滤器的变体,但我不能再进一步了。希望有人能看到我的错误并为我指出正确的方向。

在您的子报告中-尝试更改此行:

<condition attribute="quotenumber" operator="eq" value="@quoteid" />

致:


它寻找的是报价编号,而不是唯一的报价标识符作为键值