To add a filter picker to a report.
1. Create a new SQL Report
2. Add a basic guid parameter to the report as shown below.
3. Save the changes. The parameter should look like this:
4. Export the report to XML
5. Edit the XML file, replacing this section
<valueProvider classGuid="aa1c2816-cbe6-47ae-a26c-a7fc6e7a3fec">
<configuration readonly="False" hideOnError="False">
<style multiline="False" multilinerows="2" labelVisible="True" />
</configuration>
</valueProvider>
with this code:
<valueProvider classGuid="fd8b9293-29b1-42e2-bac5-7774df8143cc">
<configuration readonly="False" hideOnError="False">
<style labelVisible="True" linkInSummary="False" showNoControls="False" allowMultiSelect="False" />
</configuration>
</valueProvider>
6. Save the xml and import it into the same folder.
7. You can now use this parameter to display only members of the selected filter by adding some code like this to your SQL query:
INNER JOIN (SELECT ResourceGuid FROM CollectionMembership WHERE CollectionGuid ='%Filter%') f
ON f.ResourceGuid = c.Guid