Tag Archives: FetchXML

Using Multi Select with SSRS and FetchXML in CRM 2011

I have been doing quite a bit of report development lately with SSRS against CRM 2011 online for various client projects.

CRM 2011 online limits you to FetchXML queries only (no SQL!). You can read more about setting up a basic report using FetchXML on TechNet, I’ll assume you already have read that and can handle the basics.

What I’d like to describe is how to make a parameter allow multiple selections. I run into this all the time. Client want’s to pick an employee or all.

In SQL you can use an IN clause, well you can do the same in FetchXML.

There is an “in” operator in FetchXML.

So all you need to do is turn on the “Allow Multiple Values” option in the parameter as shown here.

Select Allow Multiple Values

Then change your FetchXML condition operator from “eq” to “in” as shown below.

The parameter selection will be sent to the query as a comma separated list of values and the proper data will be filtered as expected.

Change FetchXML operator

Good luck!