API/CodeSamples/VisualizationBaseUrl.md
... ...
@@ -0,0 +1,66 @@
1
+#VisibleDataSources
2
+
3
+[[_TOC_]]
4
+
5
+##About
6
+**Data Type:** string
7
+**Accepted Values:** URL locations
8
+**Default value:** string.Empty
9
+**Impacted Features:** Report Designer Chart Tab
10
+**Purpose:** Gets or sets the base URL of the site in image references for Visualizations on the Chart tab of the Report Designer.
11
+**Usage:** This setting is used to ensure that the image files are located by the application for Visualizations on the Chart tab of the Report Designer. A typical use case is a multi-tenant application, where the Izenda URL changes based on tenant (i.e. tenant alpha sees URL "http://www.mysite.com/alpha/ReportList" and tenant beta sees "http://www.mysite.com/beta/ReportList").
12
+**Caveats:** This setting should not be used in the typical integration. Only use when Visualization images do not appear in the Chart tab of the Report Designer (see screenshots below).
13
+
14
+##Code Samples
15
+###Global.asax (C♯)
16
+
17
+```csharp
18
+//main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
19
+public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
20
+{
21
+ // Configure settings
22
+ // Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method
23
+ public static void InitializeReporting() {
24
+ //Check to see if we've already initialized.
25
+ if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null)
26
+ return;
27
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE";
28
+ //Creates a connection to Microsoft SQL Server
29
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
30
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig();
31
+ AdHocSettings.VisualizationsBaseUrl = "http://www.mysite.com/"; //The relevant setting
32
+ HttpContext.Current.Session["ReportingInitialized"] = true;
33
+ }
34
+}
35
+```
36
+
37
+###Global.asax (VB.NET)
38
+
39
+```visualbasic
40
+'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
41
+Public Class CustomAdHocConfig
42
+ Inherits Izenda.AdHoc.DatabaseAdHocConfig
43
+
44
+ Shared Sub InitializeReporting()
45
+ 'Check to see if we've already initialized
46
+ If HttpContext.Current.Session Is Nothing OrElse HttpContext.Current.Session("ReportingInitialized") IsNot Nothing Then
47
+ Return
48
+ 'Initialize System
49
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"
50
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
51
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig()
52
+ AdHocSettings.VisualizationsBaseUrl = "http://www.mysite.com/" 'The relevant setting
53
+ HttpContext.Current.Session("ReportingInitialized") = True
54
+ End Sub
55
+End Class
56
+```
57
+
58
+##Screenshots
59
+
60
+**Visualization Images**
61
+
62
+![Visualization Images](/API/CodeSamples/VisualizationBaseUrl/Visualizations.png)
63
+
64
+**Missing Images**
65
+
66
+![Missing Visualization Images](http://fogbugz.izenda.us/default.asp?pg=pgDownload&pgType=pgFile&ixBugEvent=289238&ixAttachment=44189&sTicket=&sFileName=image.png)
... ...
\ No newline at end of file