Categories: FetchXML
If any of my blogs or videos have ever helped you, I’d love to ask a favour.
I’m taking on a challenge: walking 50 KM in under 10 hours in honour of two incredible women who are both bravely facing chemotherapy right now.
🩷 I’m fundraising for Cancer Research UK 🩷
If you can help, every donation, big or small, helps bring us closer to a cure
*** NOTE: ALL INFORMATION IS ACCURATE AT DATE OF PUBLISHING ***

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.


Check out the latest post:
Show Or Hide Custom Pages Using Power Fx Formulas In Your Model-driven Apps


If any of my blogs or videos have ever helped you, I’d love to ask a favour.
I’m taking on a challenge: walking 50 KM in under 10 hours in honour of two incredible women who are both bravely facing chemotherapy right now.
🩷 I’m fundraising for Cancer Research UK 🩷
If you can help, every donation, big or small, helps bring us closer to a cure
This is just 1 of 556 articles. You can browse through all of them by going to the main blog page, or navigate through different categories to find more content you are interested in. You can also subscribe and get new blog posts emailed to you directly.