API/CodeSamples/OutputTypes.md
... ...
@@ -0,0 +1,67 @@
1
+#OutputTypes
2
+
3
+[[_TOC_]]
4
+
5
+##About
6
+
7
+Gets or sets the registered Izenda.AdHoc.ReportOutputGenerators. These control what formats reports may be exported to.
8
+
9
+**Default Value:** ReportOutputGeneratorCollection[12]
10
+
11
+Keys:
12
+
13
+* SQL
14
+* RDL
15
+* PDF
16
+* HTMLREPORT
17
+* CSV
18
+* BULKCSV
19
+* XLS(MIME)
20
+* DOC
21
+* ODT
22
+* XML
23
+* JSON
24
+* JSA
25
+
26
+##Global.asax (C♯)
27
+
28
+```csharp
29
+//main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
30
+public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
31
+{
32
+ // Configure settings
33
+ // Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method
34
+ public static void InitializeReporting() {
35
+ //Check to see if we've already initialized.
36
+ if (AdHocContext.Initialized)
37
+ return;
38
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE";
39
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
40
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig();
41
+ AdHocSettings.OutputTypes.Remove("JSON"); //The relevant setting
42
+ AdHocContext.Initialized = true;
43
+ }
44
+}
45
+```
46
+
47
+##Global.asax (VB.NET)
48
+
49
+```visualbasic
50
+
51
+'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
52
+Public Class CustomAdHocConfig
53
+ Inherits Izenda.AdHoc.DatabaseAdHocConfig
54
+
55
+ Shared Sub InitializeReporting()
56
+ 'Check to see if we've already initialized
57
+ If AdHocContext.Initialized Then
58
+ Return
59
+ 'Initialize System
60
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"
61
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
62
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig()
63
+ AdHocSettings.OutputTypes.Remove("JSON") 'The relevant setting
64
+ AdHocContext.Initialized = True
65
+ End Sub
66
+End Class
67
+```
... ...
\ No newline at end of file