Monday, September 5, 2011

CRM 2011 - Report Parameter (Pre-Fitler Configuration )



1 Step:

Create new Parameter, like this:


Set default values :



Default values

select response0.*
from Filtered<Entityname> as response0
where (response0.statecode=0)

Now open the Report code and add or modify the following property (CustomProperty):



CODE: 




Default values


<CustomProperty>
      <Name>Custom</Name>
      <Value>
&lt;MSCRM xmlns="mscrm"&gt;&amp;lt;ReportFilter&amp;gt;&amp;lt;ReportEntity paramname="CRM_Filtered<EntityName>"&amp;gt;&amp;lt;fetch version="1.0" 
output-format=" xml-platform" mapping="logical" distinct="false"
&amp;gt;&amp;lt;entity name="<EntityName"&amp; gt;&amp; lt;all-attributes /&amp;gt;&amp;lt;filter type="and"&amp;gt;&amp;lt; condition attribute= "statecode" operator="eq" value="0" /&amp;gt;&amp;lt;/filter&amp;gt;&amp;lt;/entity&amp;gt;&amp;lt;/fetch&amp;gt;&amp;lt; /ReportEntity&amp;gt;&amp;lt;/ReportFilter&amp;gt;&lt;/MSCRM&gt;
    </Value>
</CustomProperty>

Replace all <entityname> with your logical entity name.

Nicola Grillo

No comments:

Post a Comment