98edefb04e6c439f8db48482968a7e9fa888671b
API/CodeSamples/ShowBetweenDateCalendar.md
| ... | ... | @@ -0,0 +1,100 @@ |
| 1 | +#ShowBetweenDateCalendar |
|
| 2 | + |
|
| 3 | +[[_TOC_]] |
|
| 4 | + |
|
| 5 | +Gets or sets the value indicating whether calendar controls should be used for the "Between" operation for DateTime filters. |
|
| 6 | +When enabled, the Between(Calendar) option appears in the Operator dropdown at the Filters tab in the ReportDesigner for DateTime fields. If it is disabled, the option "Between" without "(Calendar)" will be displayed instead. By default, the Between(Calendar) option uses short date notation(unable to specify a time of day) whereas the standard Between option will allow datetimes to be specified. |
|
| 7 | + |
|
| 8 | +Default value: true |
|
| 9 | + |
|
| 10 | +##C♯ |
|
| 11 | + |
|
| 12 | +```csharp |
|
| 13 | +<%@ Application Language="C#" %> |
|
| 14 | +<%@ Import Namespace="Izenda.AdHoc" %> |
|
| 15 | + |
|
| 16 | +<script runat="server"> |
|
| 17 | + |
|
| 18 | + void Session_Start(object sender, EventArgs e) |
|
| 19 | + { |
|
| 20 | + AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"; |
|
| 21 | + Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig(); |
|
| 22 | + } |
|
| 23 | + |
|
| 24 | + public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig |
|
| 25 | + { |
|
| 26 | + // Configure settings |
|
| 27 | + // Add Custom Setting below license key and connection string setting |
|
| 28 | + public override void ConfigureSettings() |
|
| 29 | + { |
|
| 30 | + AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"; |
|
| 31 | + //AdHocSettings.VisibleTables = new string[] { "VIEW1", "TABLE2" }; |
|
| 32 | + AdHocSettings.ShowBetweenDateCalendar = true; |
|
| 33 | + |
|
| 34 | + } |
|
| 35 | + |
|
| 36 | + // Control what reports are visible for the current user |
|
| 37 | + public override Izenda.AdHoc.ReportInfo[] ListReports() |
|
| 38 | + { |
|
| 39 | + return base.ListReports(); |
|
| 40 | + } |
|
| 41 | + |
|
| 42 | + // Customize a report on the fly prior to execution on a per user basis |
|
| 43 | + public override void PreExecuteReportSet(Izenda.AdHoc.ReportSet reportSet) |
|
| 44 | + { |
|
| 45 | + |
|
| 46 | + } |
|
| 47 | + |
|
| 48 | + } |
|
| 49 | +</script> |
|
| 50 | +``` |
|
| 51 | + |
|
| 52 | +##VB.NET |
|
| 53 | + |
|
| 54 | +```visualbasic |
|
| 55 | +<%@ Application Language="VB" %> |
|
| 56 | +<%@ Import Namespace="Izenda.AdHoc" %> |
|
| 57 | + |
|
| 58 | +<script runat="server"> |
|
| 59 | + |
|
| 60 | + Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) |
|
| 61 | + AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE" |
|
| 62 | + Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig() |
|
| 63 | + End Sub |
|
| 64 | + |
|
| 65 | + Public Class CustomAdHocConfig |
|
| 66 | + Inherits Izenda.AdHoc.DatabaseAdHocConfig |
|
| 67 | + |
|
| 68 | + ' Configure settings |
|
| 69 | + ' Add Custom Setting below license key and connection string setting |
|
| 70 | + Public Overrides Sub ConfigureSettings() |
|
| 71 | + AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE" |
|
| 72 | + 'AdHocSettings.VisibleTables = New String() { "VIEW1", "TABLE2" } |
|
| 73 | + AdHocSettings.ShowBetweenDateCalendar = True |
|
| 74 | + |
|
| 75 | + End Sub |
|
| 76 | + |
|
| 77 | + ' Control what reports are visible for the current user |
|
| 78 | + Public Overrides Function ListReports() As Izenda.AdHoc.ReportInfo() |
|
| 79 | + Return MyBase.ListReports |
|
| 80 | + End Function |
|
| 81 | + |
|
| 82 | + ' Customize a report on the fly prior to execution on a per user basis |
|
| 83 | + Public Overrides Sub PreExecuteReportSet(ByVal reportSet As Izenda.AdHoc.ReportSet) |
|
| 84 | + |
|
| 85 | + End Sub |
|
| 86 | + |
|
| 87 | + End Class |
|
| 88 | + |
|
| 89 | +</script> |
|
| 90 | +``` |
|
| 91 | + |
|
| 92 | +##Screenshots |
|
| 93 | + |
|
| 94 | +###AdHocSettings.ShowBetweenDateCalendar = true |
|
| 95 | + |
|
| 96 | + |
|
| 97 | + |
|
| 98 | +###AdHocSettings.ShowBetweenDateCalendar = false |
|
| 99 | + |
|
| 100 | + |
|
| ... | ... | \ No newline at end of file |