MS CRM 2011 FetchXml - 在 CRM 中部署报表时不会获取报表参数
我在尝试将动态参数传递到使用 fetchxml 创建的报告时遇到问题。当我在 BIDS 中看到报表预览时,我可以输入参数值,报表工作得很好,但当我尝试从 CRM 在线运行报表时,就会出现问题。该报告似乎没有选择 CRM 中的“帐户”和“帐户计划”值,并且报告为空。仅供参考,“帐户计划”是我创建的自定义实体。 如果有人能花时间提供关于如何解决这个问题的意见/建议,我将不胜感激。
以下是我的 fetchxml 报告中的一些信息...
我已将以下报告和查询参数添加到我的报告中:-
<QueryParameters>
<QueryParameter Name="@CRM_FilteredAccount">
<Value>=Parameters!CRM_FilteredAccount.Value</Value>
</QueryParameter>
<QueryParameter Name="@CRM_FilteredAccountPlan">
<Value>=Parameters!CRM_FilteredAccountPlan.Value</Value>
</QueryParameter>
</QueryParameters>
细绳 CRM_过滤帐户 细绳 CRM_FilteredAccountPlan
这是根实体标签:-
我使用以下过滤器:-
<filter type="and">
<condition attribute="statecode" operator="eq" value="0" />
<condition attribute="name" operator="eq" value="@CRM_FilteredAccount" />
</filter>
这是链接实体标签:-
我使用以下过滤器:-
<filter type="and">
<condition attribute="statecode" operator="eq" value="0" />
<condition attribute="opt_name" operator="eq" value="@CRM_FilteredAccountPlan" />
</filter>
I am facing a problem when trying to pass dynamic parameters to a report created using fetchxml. When I see a preview of the report in BIDS I can enter the parameter values and the report works just fine, but the problem occurs when I try to run the report from CRM online. The report doesn't seem to pick the 'account' and 'account plan' values in CRM and the report is empty. FYI, 'account plan' is a custom entity I created.
I'd appreciate if someone can please take time and provide their inputs/suggestions on how I can sort this problem out.
Here is some information from my fetchxml report...
I have added the following report and query parameters to my report:-
<QueryParameters>
<QueryParameter Name="@CRM_FilteredAccount">
<Value>=Parameters!CRM_FilteredAccount.Value</Value>
</QueryParameter>
<QueryParameter Name="@CRM_FilteredAccountPlan">
<Value>=Parameters!CRM_FilteredAccountPlan.Value</Value>
</QueryParameter>
</QueryParameters>
String
CRM_FilteredAccount
String
CRM_FilteredAccountPlan
This is the root entity tag:-
<entity name="account" enableprefiltering="true" prefilterparametername="CRM_FilteredAccount">
where I am using the following filter:-
<filter type="and">
<condition attribute="statecode" operator="eq" value="0" />
<condition attribute="name" operator="eq" value="@CRM_FilteredAccount" />
</filter>
This is the link-entity tag:-
<link-entity name="opt_accountplan" from="opt_account" to="accountid" visible="false" link-type="outer" alias="accountplan" enableprefiltering="true" prefilterparametername="CRM_FilteredAccountPlan">
where I am using the following filter:-
<filter type="and">
<condition attribute="statecode" operator="eq" value="0" />
<condition attribute="opt_name" operator="eq" value="@CRM_FilteredAccountPlan" />
</filter>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您首次将 RDL 上传到 CRM 时,请确保将“显示位置”设置为“相关记录类型的表单”和“相关记录类型的列表”,否则报表将永远不会出现在正确的位置(在实体窗体或视图上,在“.../运行报表/在选定记录上运行”菜单选项下)并且不会发生任何过滤。首次上传报告后更改设置无法解决此问题。
如果您第一次上传报告时没有正确设置这些值,只需从 CRM 中删除报告并使用正确的设置重新导入即可,这样表单或视图就可以将过滤传递到报告中。
When you first upload the RDL to CRM, make sure you have "Display In" set to "Forms for related record types" and "Lists for related record types", otherwise the report will never appear in the correct place (on the entity form or view, under the ".../Run Report/Run on Selected Records" menu option) and no filtering will occur. Changing the settings after the first time you upload the report will not fix this problem.
If you uploaded the report without these values being set correctly the first time, just delete the report from CRM and re-import it with the correct settings and that will allow the form or view to pass the filtering into the report.