2a555d984a6a2e6db11dd5911d86fb5f7d166136
API/CodeSamples/ShowFiltersTab.md
| ... | ... | @@ -0,0 +1,60 @@ |
| 1 | +#ShowFiltersTab |
|
| 2 | + |
|
| 3 | +[[_TOC_]] |
|
| 4 | + |
|
| 5 | +##About |
|
| 6 | + |
|
| 7 | +Gets or sets the value that enables/disables the Filters tab from appearing on the Izenda Reports application Report Designer page. Read more on the [[Filters tab|/Guides/ReportDesign/5.0-Filters-tab]]. |
|
| 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 | + public static void InitializeReporting() { |
|
| 17 | + //Check to see if we've already initialized. |
|
| 18 | + if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null) |
|
| 19 | + return; |
|
| 20 | + AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"; |
|
| 21 | + //Creates a connection to Microsoft SQL Server |
|
| 22 | + AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"; |
|
| 23 | + Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig(); |
|
| 24 | + AdHocSettings.ShowFiltersTab = true; //the relevant setting |
|
| 25 | + HttpContext.Current.Session["ReportingInitialized"] = true; |
|
| 26 | + } |
|
| 27 | +} |
|
| 28 | +``` |
|
| 29 | + |
|
| 30 | +##Global.asax (VB.NET) |
|
| 31 | + |
|
| 32 | +```visualbasic |
|
| 33 | +'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig |
|
| 34 | +Public Class CustomAdHocConfig |
|
| 35 | + Inherits Izenda.AdHoc.DatabaseAdHocConfig |
|
| 36 | + |
|
| 37 | + 'Configure settings |
|
| 38 | + Shared Sub InitializeReporting() |
|
| 39 | + 'Check to see if we've already initialized. |
|
| 40 | + If HttpContext.Current.Session Is Nothing OrElse HttpContext.Current.Session("ReportingInitialized") IsNot Nothing Then |
|
| 41 | + Return |
|
| 42 | + 'Initialize System |
|
| 43 | + AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE" |
|
| 44 | + AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE" |
|
| 45 | + Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig() |
|
| 46 | + AdHocSettings.ShowFiltersTab = True 'The relevant setting |
|
| 47 | + HttpContext.Current.Session("ReportingInitialized") = True |
|
| 48 | + End Sub |
|
| 49 | +End Class |
|
| 50 | +``` |
|
| 51 | + |
|
| 52 | +##Screenshots |
|
| 53 | + |
|
| 54 | +AdHocSettings.ShowSettingsButton = false |
|
| 55 | + |
|
| 56 | +![]() |
|
| 57 | + |
|
| 58 | +AdHocSettings.ShowSettingsButton = true |
|
| 59 | + |
|
| 60 | +![]() |
|
| ... | ... | \ No newline at end of file |