3400ce65e9a0474466cdf6531267fde72ad30c56
FAQ/PreExecuteReportSet.md
| ... | ... | @@ -13,10 +13,14 @@ public class CustomAdHocConfig : DatabaseAdHocConfig |
| 13 | 13 | { |
| 14 | 14 | public static void InitializeReporting() |
| 15 | 15 | { |
| 16 | + //Check to see if we've already initialized. |
|
| 17 | + if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null) |
|
| 18 | + return; |
|
| 16 | 19 | AdHocSettings.LicenseKey = "INSERT_YOUR_LICENSE_KEY_HERE"; |
| 17 | 20 | AdHocSettings.SqlServerConnectionString = "INSERT_YOUR_CONNECTION_STRING_HERE"; |
| 18 | 21 | AdHocSettings.AdHocConfig = new CustomAdHocConfig(); |
| 19 | 22 | //Global and per-user initialization settings will be configured here |
| 23 | + HttpContext.Current.Session["ReportingInitialized"] = true; |
|
| 20 | 24 | } |
| 21 | 25 | |
| 22 | 26 | public override void PreExecuteReportSet(ReportSet reportSet) |
| ... | ... | @@ -40,6 +44,7 @@ Public Class CustomAdHocConfig |
| 40 | 44 | AdHocSettings.SqlServerConnectionString = "INSERT_YOUR_CONNECTION_STRING_HERE" |
| 41 | 45 | AdHocSettings.AdHocConfig = New CustomAdHocConfig() |
| 42 | 46 | 'Global and per-user initialization settings will be configured here |
| 47 | + HttpContext.Current.Session("ReportingInitialized") = True |
|
| 43 | 48 | End Sub |
| 44 | 49 | |
| 45 | 50 | Public Overrides Sub PreExecuteReportSet(ByVal reportSet As Izenda.AdHoc.ReportSet) |