API/CodeSamples/AllowSummaryDeltas.md
... ...
@@ -0,0 +1,74 @@
1
+#AllowSummaryDeltas
2
+
3
+[[_TOC_]]
4
+
5
+##About
6
+
7
+Gets or sets the value indicating whether the "Add Deltas" checkbox should be shown in the summary tab in the ReportDesigner. When this setting is on and the checkbox is checked on the report, any time there is a change in a quantity between two records, that change is calculated by taking the later value for that quantity and subtracting from it the earlier value for that quantity.
8
+
9
+_**Note:** The [[allowDeltas|/API/CodeSamples/AllowDeltas]] setting MUST be turned on to use this feature._
10
+
11
+**Default Value:** true
12
+
13
+##Global.asax (C♯)
14
+
15
+```csharp
16
+//main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
17
+public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
18
+{
19
+ // Configure settings
20
+ // Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method
21
+ public static void InitializeReporting() {
22
+ //Check to see if we've already initialized.
23
+ if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null)
24
+ return;
25
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE";
26
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
27
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig();
28
+ AdHocSettings.AllowSummaryDeltas = true; //The relevant setting
29
+ HttpContext.Current.Session["ReportingInitialized"] = true;
30
+ }
31
+}
32
+```
33
+
34
+##Global.asax (VB.NET)
35
+
36
+```visualbasic
37
+
38
+'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
39
+Public Class CustomAdHocConfig
40
+ Inherits Izenda.AdHoc.DatabaseAdHocConfig
41
+
42
+ Shared Sub InitializeReporting()
43
+ 'Check to see if we've already initialized
44
+ If HttpContext.Current.Session Is Nothing OrElse HttpContext.Current.Session("ReportingInitialized") IsNot Nothing Then
45
+ Return
46
+ 'Initialize System
47
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"
48
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"
49
+ Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig()
50
+ AdHocSettings.AllowSummaryDeltas = True 'The relevant setting
51
+ HttpContext.Current.Session("ReportingInitialized") = True
52
+ End Sub
53
+End Class
54
+```
55
+
56
+##Screenshots
57
+
58
+AdHocSettings.AllowSummaryDeltas = true
59
+
60
+![](http://wiki.izenda.us//API/CodeSamples/AllowSummaryDeltas/allowsummarydeltas_true.png)
61
+
62
+Results
63
+
64
+![](http://wiki.izenda.us//API/CodeSamples/AllowSummaryDeltas/allowsummarydeltas_results_true.png)
65
+
66
+---
67
+
68
+AdHocSettings.AllowSummaryDeltas = false
69
+
70
+![](http://wiki.izenda.us//API/CodeSamples/AllowSummaryDeltas/allowsummarydeltas_false.png)
71
+
72
+Results
73
+
74
+![](http://wiki.izenda.us//API/CodeSamples/AllowSummaryDeltas/allowsummarydeltas_results_false.png)
... ...
\ No newline at end of file