API/CodeSamples/DataSourceCategories.md
... ...
@@ -24,7 +24,7 @@ public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
24 24
//Creates a connection to Microsoft SQL Server
25 25
AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
26 26
Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig();
27
- AdHocSettings.DataSourceCategories = new string[] {"Employees", "Territories"}; //The relevant setting
27
+ AdHocSettings.DataSourceCategories["Employees"] = new string[] { "Employees", "Territories" }; //The relevant setting
28 28
HttpContext.Current.Session["ReportingInitialized"] = true;
29 29
}
30 30
}
... ...
@@ -46,7 +46,7 @@ Public Class CustomAdHocConfig
46 46
AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"
47 47
AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
48 48
Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig()
49
- AdHocSettings.DataSourceCategories = New String() {"Employees", "Territories"} 'The relevant setting
49
+ AdHocSettings.DataSourceCategories("Employees") = New String() {"Employees", "Territories"} 'The relevant setting
50 50
HttpContext.Current.Session("ReportingInitialized") = True
51 51
End Sub
52 52
End Class