Adding CRM Filters To FetchXML Reports

If you have written CRM reports in SQL using SSRS, you are probably familiar with adding the pre filtering using CRMAF_ to your query (check out this great article if you aren’t).This allows you to set default filters using Advanced Find which users can adjust if needed prior to running a report. Makes it very handy when running reports for a specific Team or User.

What about with FetchXML reports? You can do the same with just a slightly different yet simple approach. Simply add enableprefiltering=”1″ in the same line where you have defined your entity.

<entity name=”quote” enableprefiltering=”1″ >

Once you upload your report to CRM, select the report, then click Edit Default Filters.

If you haven’t got the pre filtering enabled, you will get a message stating filtering isn’t an option for this report.

If you have, you will see what should be a familiar screen that looks like the Advanced Find functionality. From here you can add in your required filtering and save it.

Users will be displayed your default filters prior to running the report. This will be prior to any filters you have written in to your SSRS report. Users can change the filters if desired and add in other options before they run the report.

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Articles