FAQ/PreExecuteReportSet.md
... ...
@@ -4,8 +4,48 @@
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.
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 8
9
+##C♯ Boilerplate
10
+
11
+```csharp
12
+public class CustomAdHocConfig : DatabaseAdHocConfig
13
+{
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
47
+}
48
+```
9 49
##Examples
10 50
11 51
Here are a couple examples of using the PreExecuteReportSet method.