64a0e1089892fe897daa468c9b83c6d3805961bc
API/CodeSamples/AllowInvertedGrid.md
| ... | ... | @@ -0,0 +1,72 @@ |
| 1 | +#AllowInvertedGrid |
|
| 2 | + |
|
| 3 | +[[_TOC_]] |
|
| 4 | + |
|
| 5 | +##About |
|
| 6 | + |
|
| 7 | +Gets or sets the value indicating whether "Invert" checkbox should be shown in the summary tab. Inverting the summary grid will use the first selected field as the column headers and each subsequent field selected will be used as normal fields, but the values will be arranged according to the new headers. The [[InvertedGridLimit|/API/CodeSamples/InvertedGridLimit]] setting determines the maximum number of header values can be used in a report. |
|
| 8 | + |
|
| 9 | +**Default Value:** false |
|
| 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 (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null) |
|
| 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.AllowInvertedGrid = true; //The relevant setting |
|
| 27 | + HttpContext.Current.Session["ReportingInitialized"] = true; |
|
| 28 | + } |
|
| 29 | +} |
|
| 30 | +``` |
|
| 31 | + |
|
| 32 | +##Global.asax (VB.NET) |
|
| 33 | + |
|
| 34 | +```visualbasic |
|
| 35 | + |
|
| 36 | +'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig |
|
| 37 | +Public Class CustomAdHocConfig |
|
| 38 | + Inherits Izenda.AdHoc.DatabaseAdHocConfig |
|
| 39 | + |
|
| 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.AllowInvertedGrid = True 'The relevant setting |
|
| 49 | + HttpContext.Current.Session("ReportingInitialized") = True |
|
| 50 | + End Sub |
|
| 51 | +End Class |
|
| 52 | +``` |
|
| 53 | + |
|
| 54 | +##Screenshots |
|
| 55 | + |
|
| 56 | +AdHocSettings.AllowInvertedGrid = true |
|
| 57 | + |
|
| 58 | + |
|
| 59 | + |
|
| 60 | +Results |
|
| 61 | + |
|
| 62 | + |
|
| 63 | + |
|
| 64 | +--- |
|
| 65 | + |
|
| 66 | +AdHocSettings.AllowInvertedGrid = false |
|
| 67 | + |
|
| 68 | + |
|
| 69 | + |
|
| 70 | +Results |
|
| 71 | + |
|
| 72 | + |
|
| ... | ... | \ No newline at end of file |