API/CodeSamples/ShowBetweenDateCalendar.md
... ...
@@ -43,28 +43,28 @@ public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
43 43
##Global.asax (VB.NET)
44 44
45 45
```visualbasic
46
- ' Configure settings
47
- ' Add Custom Setting below license key and connection string setting
48
- Public Overrides Sub ConfigureSettings()
49
- AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
50
- 'AdHocSettings.VisibleTables = New String() { "VIEW1", "TABLE2" }
51
- AdHocSettings.ShowBetweenDateCalendar = True
52
-
53
- End Sub
54
-
55
- ' Control what reports are visible for the current user
56
- Public Overrides Function ListReports() As Izenda.AdHoc.ReportInfo()
57
- Return MyBase.ListReports
58
- End Function
59
-
60
- ' Customize a report on the fly prior to execution on a per user basis
61
- Public Overrides Sub PreExecuteReportSet(ByVal reportSet As Izenda.AdHoc.ReportSet)
62
-
63
- End Sub
64
-
65
- End Class
66
-
67
-</script>
46
+'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
47
+Public Class CustomAdHocConfig
48
+ Inherits Izenda.AdHoc.DatabaseAdHocConfig
49
+
50
+ 'Configure settings
51
+ 'Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method
52
+ Shared Sub InitializeReporting()
53
+ 'Check to see if we've already initialized.
54
+ If HttpContext.Current.Session Is Nothing OrElse HttpContext.Current.Session("ReportingInitialized") IsNot Nothing Then
55
+ Return
56
+ 'Initialize System
57
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"
58
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
59
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig()
60
+ HttpContext.Current.Session("ReortingInitialized") = True
61
+ End Sub
62
+
63
+ 'Add custom settings below
64
+ Public Overrides Sub ConfigureSettings()
65
+ AdHocSettings.ShowBetweenDateCalendar = True
66
+ End Sub
67
+End Class
68 68
```
69 69
70 70
##Screenshots