Note: This scenario is a follow on to the previous Report Editor Training Scenarios. It assumes you have completed the steps in those scenarios.
Custom Site Filters enable you to filter any list against criteria defined in the Project Statement. For example, you may have defined markets (e.g. France, Ireland and USA) in the Project Statement. If you added a custom Site Filter to a work or issues report, you could see only the items that were relevant to the market you were interested in (e.g. see all high priority issues for Ireland or all late work for France).
At a high level, the set of steps to achieve this include:
Note: As with the other scenarios, this topic assumes you have a scratch area to carry out this exercise (i.e. that has a project office with projects underneath it); however, you should also be able to adapt these steps to carry them out in a live area, replacing the values and names where appropriate.
Add the Country site column you created previously to the Project Statement in a template and sync this template to your training site (alternatively, you can add the Country site column directly to the Project Statement in the training site).
Open the Project Statement for editing and select a value from the Country column (e.g. USA).
Note: If you have a number of project sites in your training area, you should also add the site column to the Project Statement in these sites as this will allow you to greater appreciate the value of the exercise.
Next, you will create a copy of the open work report.
Note: In a real world situation is likely that you would add the Project Filter to the report before adding or replacing the report on the page. We are doing it this way so you can appreciate the before and after effect.
Next, you will replace the open work report in the Project Office with the one you just created.
Note: We recommend that you keep this page open whilst you complete the rest of the exercise. Ctrl click on the Home tab on the Top Link bar to go the correct location for the next section.
Next, you will add the site filter to your report. First you add a Project Filter and then a Report Filter. The Project Filter contains the CAML that filters the column you added, the Report Filter contains the in-report menu that allows you to dynamically filter the report.
Note: The FieldRef name (Market) queries the site column you added earlier. If you gave the site column a different name you should update it to this.
The [Market] item between the Value tags is what you will use for the Report Filter internal name. You can use any value you like here but you should remember what you uses as you will reuse it when adding the Report Filter.
See Working with Query CAML for more information about CAML.
<Where>
<Eq>
<FieldRef Name="Market" />
<Value Type="Text">[Market]</Value>
</Eq>
</Where>
Note: In this example we are using the simple Values choice type. For more information on the various choice filter options, see Add a New Report Filter.
Now, if you return to the report page and refresh it, you should see your filter. If you select the value (e.g. USA) you selected in the Project Statement you added the site column to, it should return work items from this site.