FAQ/ProcessEqualsSelectList.md
... ...
@@ -1,53 +1,30 @@
1
-#The PreExecuteReportSet() Method
1
+#The ProcessEqualsSelectList() Method
2 2
3 3
[[_TOC_]]
4 4
5 5
##About
6 6
7
-The PreExecuteReportSet method is used to modify the report before it is sent to the Report Viewer or Report Preview for viewing. Overriding this method can add granular control of fields, filters, and other properties of the report before the person designing/viewing the report will see it. This method should be overridden inside your CustomAdHocConfig class within your global.asax page.
7
+#The ProcessEqualsSelectList() Method
8 8
9
-##C♯ Boilerplate
9
+This code sample overrides the equals select drop-down used in the "Filter" tab and in the Report Viewer.
10
+
11
+Here is sample code that you can add to your global.asax file:
10 12
11 13
```csharp
12
-public class CustomAdHocConfig : DatabaseAdHocConfig
14
+public override string[] ProcessEqualsSelectList(Izenda.AdHoc.Database.Column column)
13 15
{
14
- public static void InitializeReporting()
15
- {
16
- AdHocSettings.LicenseKey = "INSERT_YOUR_LICENSE_KEY_HERE";
17
- AdHocSettings.SqlServerConnectionString = "INSERT_YOUR_CONNECTION_STRING_HERE";
18
- AdHocSettings.AdHocConfig = new CustomAdHocConfig();
19
- }
20
- public override void ConfigureSettings()
21
- {
22
- //Per-user settings go here
23
- }
24
- public override string[] ProcessEqualsSelectList(Izenda.AdHoc.Database.Column column)
25
- {
26
- //put your own custom code inside this method
27
- }
28
-}
29
-```
30
-
31
-##VB.NET Boilerplate
32
-
33
-```visualbasic
34
-Public Class CustomAdHocConfig
35
- Inherits DatabaseAdHocConfig
36
- Public Shared Sub InitializeReporting()
37
- AdHocSettings.LicenseKey = "INSERT_YOUR_LICENSE_KEY_HERE"
38
- AdHocSettings.SqlServerConnectionString = "INSERT_YOUR_CONNECTION_STRING_HERE"
39
- AdHocSettings.AdHocConfig = New CustomAdHocConfig()
40
- End Sub
41
- public override void ConfigureSettings()
42
- 'Per-user settings go here
43
- End Sub
44
- Public Overrides Function ProcessEqualsSelectList(ByVal column As Izenda.AdHoc.Database.Column) As String()
45
- 'put your own custom code inside this method
46
- End Function
16
+ //look for a particular column name
17
+ if (column.Name == "VendorName")
18
+ {
19
+ ArrayList filteredValues = new ArrayList();
20
+ filteredValues.Add("Vendor 1");
21
+ filteredValues.Add("Vendor 2");
22
+
23
+ //return custom list of values instead of full list
24
+ return (string[])filteredValues.ToArray(typeof(string));
25
+ }
26
+
27
+ // return base if custom array is not created
28
+ return base.ProcessEqualsSelectList(column);
47 29
}
48
-```
49
-##Examples
50
-
51
-Here are a couple examples of using the ProcessEqualsSelectList method.
52
-
53
-* [[Using Stored Procedures|/FAQ/Questions/Using-Stored-Procedures-In-Izenda-6]]
... ...
\ No newline at end of file
0
+```
... ...
\ No newline at end of file