8bfd01b91aba59154bbd40475359e9aeda89f270
API/AdHocConfig.md
| ... | ... | @@ -16,6 +16,10 @@ public class CustomAdHocConfig : Izenda.AdHoc.FileSystemAdHocConfig |
| 16 | 16 | //Initializing these settings in a static context is a best practice for Izenda to run smoothly. This method will need to be called on your reporting pages or from Session_Start(). |
| 17 | 17 | public static void InitializeReporting() |
| 18 | 18 | { |
| 19 | + //Check to see if we've already initialized. |
|
| 20 | + if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null) |
|
| 21 | + return; |
|
| 22 | + //Initialize System |
|
| 19 | 23 | AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"; |
| 20 | 24 | AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"; |
| 21 | 25 | AdHocSettings.GenerateThumbnails = True; |