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>