c936e572413804a43880ee7717d307d44614bcf0
API/CodeSamples/GeoDataTable.md
| ... | ... | @@ -0,0 +1,58 @@ |
| 1 | +#GeoDataTable |
|
| 2 | + |
|
| 3 | +[[_TOC_]] |
|
| 4 | + |
|
| 5 | +##About |
|
| 6 | + |
|
| 7 | +Gets or sets the value indicating the table name that contains geodata for maps. This should be a fully qualified database object name such as [dbo].[MyGeoDataTable] and will be automatically joined to map reports using the indicator bar on the field supplied for the "City" option. For best results, ensure that each city in your database has exactly one corresponding record in your geodata table. Furthermore, the geodata table needs to be specified with the following fields in order for the automatic join function to work: |
|
| 8 | + |
|
| 9 | +* City |
|
| 10 | +* Latitude |
|
| 11 | +* Longitude |
|
| 12 | + |
|
| 13 | +_**Note:** If the geodata table requires a composite key, it is possible to specify the join manually or programatically, but automatic joining does not work for composite keys._ |
|
| 14 | + |
|
| 15 | +**Default Value:** String.Empty |
|
| 16 | + |
|
| 17 | +##Global.asax (C♯) |
|
| 18 | + |
|
| 19 | +```csharp |
|
| 20 | +//main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig |
|
| 21 | +public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig |
|
| 22 | +{ |
|
| 23 | + // Configure settings |
|
| 24 | + // Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method |
|
| 25 | + public static void InitializeReporting() { |
|
| 26 | + //Check to see if we've already initialized. |
|
| 27 | + if (AdHocContext.Initialized) |
|
| 28 | + return; |
|
| 29 | + AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"; |
|
| 30 | + AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"; |
|
| 31 | + Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig(); |
|
| 32 | + AdHocSettings.GeoDataTable = 15D; //The relevant setting |
|
| 33 | + AdHocContext.Initialized = true; |
|
| 34 | + } |
|
| 35 | +} |
|
| 36 | +``` |
|
| 37 | + |
|
| 38 | +##Global.asax (VB.NET) |
|
| 39 | + |
|
| 40 | +```visualbasic |
|
| 41 | + |
|
| 42 | +'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig |
|
| 43 | +Public Class CustomAdHocConfig |
|
| 44 | + Inherits Izenda.AdHoc.DatabaseAdHocConfig |
|
| 45 | + |
|
| 46 | + Shared Sub InitializeReporting() |
|
| 47 | + 'Check to see if we've already initialized |
|
| 48 | + If AdHocContext.Initialized Then |
|
| 49 | + Return |
|
| 50 | + 'Initialize System |
|
| 51 | + AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE" |
|
| 52 | + AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE" |
|
| 53 | + Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig() |
|
| 54 | + AdHocSettings.GeoDataTable = 15D 'The relevant setting |
|
| 55 | + AdHocContext.Initialized = True |
|
| 56 | + End Sub |
|
| 57 | +End Class |
|
| 58 | +``` |
|
| ... | ... | \ No newline at end of file |