API/CodeSamples/EmptyReportString.md
... ...
@@ -0,0 +1,62 @@
1
+#EmptyReportString
2
+
3
+[[_TOC_]]
4
+
5
+##About
6
+
7
+Gets or sets the text that will display when a report or sub-report return 0 results. If this is left null, it will display "No Results" as the report output.
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
+ public static void InitializeReporting() {
19
+ //Check to see if we've already initialized.
20
+ if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null)
21
+ return;
22
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE";
23
+ //Creates a connection to Microsoft SQL Server
24
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
25
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig();
26
+ AdHocSettings.EmptyReportString = "There were no reports to display"; //the relevant setting
27
+ HttpContext.Current.Session["ReportingInitialized"] = true;
28
+ }
29
+}
30
+```
31
+
32
+##Global.asax (VB.NET)
33
+
34
+```visualbasic
35
+'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
36
+Public Class CustomAdHocConfig
37
+ Inherits Izenda.AdHoc.DatabaseAdHocConfig
38
+
39
+ 'Configure settings
40
+ Shared Sub InitializeReporting()
41
+ 'Check to see if we've already initialized.
42
+ If HttpContext.Current.Session Is Nothing OrElse HttpContext.Current.Session("ReportingInitialized") IsNot Nothing Then
43
+ Return
44
+ 'Initialize System
45
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"
46
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
47
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig()
48
+ AdHocSettings.EmptyReportString = "There were no reports to display" 'The relevant setting
49
+ HttpContext.Current.Session("ReportingInitialized") = True
50
+ End Sub
51
+End Class
52
+```
53
+
54
+##Screenshots
55
+
56
+AdHocSettings.EmptyReportString = null;
57
+
58
+![](/API/CodeSamples/EmptyReportString/EmptyReportString_1.png)
59
+
60
+AdHocSettings.EmptyReportString = "There were no reports to display";
61
+
62
+![](/API/CodeSamples/EmptyReportString/EmptyReportString_2.png)
... ...
\ No newline at end of file