FAQ/Questions/Adding-custom-filters-to-dashboards.md
... ...
@@ -1,9 +1,66 @@
1
-#Dashboard filters
1
+#How Does Filtering In Dashboards Work?
2 2
3 3
[[_TOC_]]
4 4
5 5
##About
6
+To apply filters in a dashboard, all reports included in the dashboard must contain the same filter.
6 7
7
-As of AdHoc Version 6.6, custom dashboard filter controls are no longer supported. Instead, Izenda uses "report parts" to allow a dashboard to inherit filters from other reports. Report parts are the tabular elements (Detail, Summary, Chart1, etc.) that are defined within a report.
8
+**The new default behavior for Izenda dashboard filtering** looks at 'fully qualified' column names for matching report filters for dashboard filtering purposes by default.
8 9
9
-If a Dashboard is constructed from the parts of reports that have the same filter set defined, then the Dashboard will also have that filter set. The filters do not have to have the same value to co-operate. Simply setting the **Field** and **Operator** is enough. The user will be able to select the value on the Dashboard Viewer.
... ...
\ No newline at end of file
0
+##Example
1
+Using the Northwinds database
2
+
3
+1) Create Report A using the Employee table:
4
+
5
+ * Fields:
6
+ * Last Name
7
+ * Country
8
+
9
+ * Filter 1: Country
10
+ * Filter 2: Last Name
11
+
12
+2) Create Report B using the Supplier table
13
+
14
+ * Fields:
15
+ * Supplier Name
16
+ * Country
17
+
18
+ * Filter 1: Country
19
+ * Filter 2: Supplier Name
20
+
21
+3) Create a dashboard from these two reports
22
+
23
+ * Expected dashboard filter: Country
24
+
25
+##Explanation
26
+
27
+**The default behavior in _classic_ (Pre v6.6) Izenda is to look at _fully qualified_ column names.**
28
+
29
+**During v6.7 the default was to use ColumnName only.**
30
+
31
+**The current default value is to use the fully qualified field name (AdHocSettings.UseColumnNameForDashboardCommonFilters = True;)**
32
+
33
+Although they may share similar values or have the exact same values, _dbo.suppliers.country_ _**IS NOT**_ _dbo.employees.country_ . Because of this, the filter in the example will not show up in the dashboard in vanilla Izenda.
34
+
35
+To disable datasource-specific behavior (fully qualified column names) for dashboard filtering, you will need to change the UseColumnNameForDashboardCommonFilters to false in your deployment after upgrading.
36
+
37
+
38
+##Global.asax (C♯)
39
+
40
+```csharp
41
+//Using the fully qualified name to determine common filters (Example: View.ColumnName)
42
+AdHocSettings.UseColumnNameForDashboardCommonFilters = true;
43
+
44
+//Using only the 'ColumnName' to determine common filters
45
+AdHocSettings.UseColumnNameForDashboardCommonFilters = false;
46
+```
47
+
48
+##Global.asax (VB.NET)
49
+
50
+```visualbasic
51
+//Using the fully qualified name to determine common filters (Example: View.ColumnName)
52
+AdHocSettings.UseColumnNameForDashboardCommonFilters = True
53
+
54
+//Using only the 'ColumnName' to determine common filters
55
+AdHocSettings.UseColumnNameForDashboardCommonFilters = False
56
+```
... ...
\ No newline at end of file