API/CodeSamples/DefaultItemsPerPage.md
... ...
@@ -0,0 +1,30 @@
1
+#CurrentUserName
2
+
3
+[[_TOC_]]
4
+
5
+##About
6
+
7
+Gets or sets the number of items per page. Lowering the number will decrease the number of results viewed per page. If this number is lower than the number of results, numbers indicating pagination will appear at the bottom of the report and the addition results will go to the next page. One row will be hyper links showing record ranges in denominations of whatever you set your DefaultItemsPerPage to. A second row will allow you to page forward, backward or enter a page number to jump to.
8
+
9
+##Global.asax (C♯)
10
+
11
+```csharp
12
+//main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig
13
+public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig
14
+{
15
+ // Configure settings
16
+ // Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method
17
+ public static void InitializeReporting() {
18
+ //Check to see if we've already initialized.
19
+ if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null)
20
+ return;
21
+ AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE";
22
+ //Creates a connection to Microsoft SQL Server
23
+ AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE";
24
+ AdHocSettings.AdHocConfig = new CustomAdHocConfig();
25
+ AdHocSettings.DefaultItemsPerPage = 100; //The relevant setting
26
+ HttpContext.Current.Session["ReportingInitialized"] = true;
27
+ }
28
+}
29
+```
30
+