Guides/mongo-bi-connector.md
... ...
@@ -35,10 +35,9 @@ public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
35 35
// Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method
36 36
public static void InitializeReporting() {
37 37
//Check to see if we've already initialized.
38
- if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null)
38
+ if (AdHocContext.Initialized)
39 39
return;
40 40
AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE";
41
- //Creates a connection to Microsoft SQL Server
42 41
AdHocSettings.PostgreSQLConnectionString = "Server=127.0.0.1;Port=27032;Database=izmongo;User Id=izmongo;Password=***;"; //The relevant setting
43 42
Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig();
44 43
HttpContext.Current.Session["ReportingInitialized"] = true;