MS CRM 2011 FetchXml - Report Parameters don't get picked up when the report is deployed in CRM
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>
<QueryP开发者_JAVA百科arameter 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>
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.
精彩评论