1c4c6ca76be7fddb7b1fcc85efbf8ddc5b2caf7e
FAQ/PreExecuteReportSet.md
| ... | ... | @@ -16,11 +16,9 @@ public class CustomAdHocConfig : DatabaseAdHocConfig |
| 16 | 16 | AdHocSettings.LicenseKey = "INSERT_YOUR_LICENSE_KEY_HERE"; |
| 17 | 17 | AdHocSettings.SqlServerConnectionString = "INSERT_YOUR_CONNECTION_STRING_HERE"; |
| 18 | 18 | AdHocSettings.AdHocConfig = new CustomAdHocConfig(); |
| 19 | + //Global and per-user initialization settings will be configured here |
|
| 19 | 20 | } |
| 20 | - public override void ConfigureSettings() |
|
| 21 | - { |
|
| 22 | - //Per-user settings go here |
|
| 23 | - } |
|
| 21 | + |
|
| 24 | 22 | public override void PreExecuteReportSet(ReportSet reportSet) |
| 25 | 23 | { |
| 26 | 24 | //put your own custom code inside this method |
| ... | ... | @@ -34,13 +32,16 @@ public class CustomAdHocConfig : DatabaseAdHocConfig |
| 34 | 32 | Public Class CustomAdHocConfig |
| 35 | 33 | Inherits DatabaseAdHocConfig |
| 36 | 34 | Public Shared Sub InitializeReporting() |
| 35 | + 'Check to see if we've already initialized. |
|
| 36 | + If HttpContext.Current.Session Is Nothing OrElse HttpContext.Current.Session("ReportingInitialized") IsNot Nothing Then |
|
| 37 | + Return |
|
| 38 | + 'Initialize System |
|
| 37 | 39 | AdHocSettings.LicenseKey = "INSERT_YOUR_LICENSE_KEY_HERE" |
| 38 | 40 | AdHocSettings.SqlServerConnectionString = "INSERT_YOUR_CONNECTION_STRING_HERE" |
| 39 | 41 | AdHocSettings.AdHocConfig = New CustomAdHocConfig() |
| 42 | + 'Global and per-user initialization settings will be configured here |
|
| 40 | 43 | End Sub |
| 41 | - public override void ConfigureSettings() |
|
| 42 | - 'Per-user settings go here |
|
| 43 | - End Sub |
|
| 44 | + |
|
| 44 | 45 | Public Overrides Sub PreExecuteReportSet(ByVal reportSet As Izenda.AdHoc.ReportSet) |
| 45 | 46 | 'put your own custom code inside this method |
| 46 | 47 | End Sub |