FAQ/ProcessEqualsSelectList.md
... ...
@@ -1,24 +1,53 @@
1
-#The ProcessEqualsSelectList() Method
1
+#The PreExecuteReportSet() Method
2 2
3
-This code sample overrides the equals select drop-down used in the "Filter" tab and in the Report Viewer.
3
+[[_TOC_]]
4 4
5
-Here is sample code that you can add to your global.asax file:
5
+##About
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.
8
+
9
+##C♯ Boilerplate
6 10
7 11
```csharp
8
-public override string[] ProcessEqualsSelectList(Izenda.AdHoc.Database.Column column)
12
+public class CustomAdHocConfig : DatabaseAdHocConfig
9 13
{
10
- //look for a particular column name
11
- if (column.Name == "VendorName")
12
- {
13
- ArrayList filteredValues = new ArrayList();
14
- filteredValues.Add("Vendor 1");
15
- filteredValues.Add("Vendor 2");
16
-
17
- //return custom list of values instead of full list
18
- return (string[])filteredValues.ToArray(typeof(string));
19
- }
20
-
21
- // return base if custom array is not created
22
- return base.ProcessEqualsSelectList(column);
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
+ }
23 28
}
24
-```
... ...
\ No newline at end of file
0
+```
1
+
2
+##VB.NET Boilerplate
3
+
4
+```visualbasic
5
+Public Class CustomAdHocConfig
6
+ Inherits DatabaseAdHocConfig
7
+ Public Shared Sub InitializeReporting()
8
+ AdHocSettings.LicenseKey = "INSERT_YOUR_LICENSE_KEY_HERE"
9
+ AdHocSettings.SqlServerConnectionString = "INSERT_YOUR_CONNECTION_STRING_HERE"
10
+ AdHocSettings.AdHocConfig = New CustomAdHocConfig()
11
+ End Sub
12
+ public override void ConfigureSettings()
13
+ 'Per-user settings go here
14
+ End Sub
15
+ Public Overrides Function ProcessEqualsSelectList(ByVal column As Izenda.AdHoc.Database.Column) As String()
16
+ 'put your own custom code inside this method
17
+ End Function
18
+}
19
+```
20
+##Examples
21
+
22
+Here are a couple examples of using the ProcessEqualsSelectList method.
23
+
24
+* [[Using Stored Procedures|/FAQ/Questions/Using-Stored-Procedures-In-Izenda-6]]
... ...
\ No newline at end of file