API/CodeSamples/EvoAzureServiceConfig.md
... ...
@@ -0,0 +1,54 @@
1
+#EvoAzureServiceConfig
2
+
3
+[[_TOC_]]
4
+
5
+##About
6
+
7
+The configuration for the Evo Azure Cloud Service. This needs to be set before assigning ``PdfPrintMode = PdfMode.EvoPdfAzureCloudService``
8
+
9
+**Default Value:** null
10
+
11
+##Global.asax (C♯)
12
+
13
+```csharp
14
+//main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
15
+public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
16
+{
17
+ // Configure settings
18
+ // Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method
19
+ public static void InitializeReporting() {
20
+ //Check to see if we've already initialized.
21
+ if (AdHocContext.Initialized)
22
+ return;
23
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE";
24
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
25
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig();
26
+ AdHocSettings.EvoAzureServiceConfig = new EvoPdfAzureCloudServiceConfig("127.0.0.1", 527); //The relevant setting
27
+ AdHocSettings.PdfPrintMode = PdfMode.EvoPdfAzureCloudService; //related setting
28
+ AdHocContext.Initialized = true;
29
+ }
30
+}
31
+```
32
+
33
+##Global.asax (VB.NET)
34
+
35
+```visualbasic
36
+
37
+'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
38
+Public Class CustomAdHocConfig
39
+ Inherits Izenda.AdHoc.DatabaseAdHocConfig
40
+
41
+ Shared Sub InitializeReporting()
42
+ 'Check to see if we've already initialized
43
+ If AdHocContext.Initialized Then
44
+ Return
45
+ 'Initialize System
46
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"
47
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
48
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig()
49
+ AdHocSettings.EvoAzureServiceConfig = New EvoPdfAzureCloudServiceConfig("127.0.0.1", 527) 'The relevant setting
50
+ AdHocSettings.PdfPrintMode = PdfMode.EvoPdfAzureCloudService 'Related setting
51
+ AdHocContext.Initialized = True
52
+ End Sub
53
+End Class
54
+```
... ...
\ No newline at end of file