Savision.Community.SLA.ServiceLevelAgreementOverviewDetials.rdl (ReportResource)

Element properties:

TypeReportResource
File NameSavision.Community.SLA.ServiceLevelAgreementOverviewDetials.rdl
AccessibilityInternal

Source Code:

<ReportResource ID="Savision.Community.SLA.ServiceLevelAgreementOverviewDetials.rdl" FileName="Savision.Community.SLA.ServiceLevelAgreementOverviewDetials.rdl" Accessibility="Internal" MIMEType="application/octet-stream"/>

File Content: Savision.Community.SLA.ServiceLevelAgreementOverviewDetials.rdl

<?xml version="1.0" encoding="utf-8"?><Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"><AutoRefresh>0</AutoRefresh><DataSources><DataSource Name="DataWarehouseMain"><DataSourceReference>/Data Warehouse Main</DataSourceReference><rd:SecurityType>None</rd:SecurityType><rd:DataSourceID>8eea5178-4f26-4800-b8e4-de8ce9930ce0</rd:DataSourceID></DataSource></DataSources><DataSets><DataSet Name="SLASLOData"><Query><DataSourceName>DataWarehouseMain</DataSourceName><QueryParameters><QueryParameter Name="@StartDate"><Value>=Code.ToDbDate(Code.GetReportStartDate())</Value></QueryParameter><QueryParameter Name="@EndDate"><Value>=Code.ToDbDate(Code.GetReportEndDate())</Value></QueryParameter><QueryParameter Name="@ServiceLevelAgreementXml"><Value>=Parameters!ServiceLevelAgreementXml.Value</Value></QueryParameter><QueryParameter Name="@AggregationTypeId"><Value>=Code.GetDBDataAggregationTypeId(Parameters!DataAggregation.Value)</Value></QueryParameter></QueryParameters><CommandType>StoredProcedure</CommandType><CommandText>Savision_Community_SLA_ServiceLevelAgreementObjectiveDataGet</CommandText></Query><Fields><Field Name="ServiceLevelAgreementRowId"><DataField>ServiceLevelAgreementRowId</DataField><rd:TypeName>System.Int32</rd:TypeName></Field><Field Name="ManagementGroupRowId"><DataField>ManagementGroupRowId</DataField><rd:TypeName>System.Int32</rd:TypeName></Field><Field Name="ServiceLevelAgreementManagedEntityRowId"><DataField>ServiceLevelAgreementManagedEntityRowId</DataField><rd:TypeName>System.Int32</rd:TypeName></Field><Field Name="ServiceLevelObjectiveRowId"><DataField>ServiceLevelObjectiveRowId</DataField><rd:TypeName>System.Int32</rd:TypeName></Field><Field Name="ServiceLevelObjectiveManagedEntityRowId"><DataField>ServiceLevelObjectiveManagedEntityRowId</DataField><rd:TypeName>System.Int32</rd:TypeName></Field><Field Name="DateTime"><DataField>DateTime</DataField><rd:TypeName>System.DateTime</rd:TypeName></Field><Field Name="ActualValue"><DataField>ActualValue</DataField><rd:TypeName>System.Double</rd:TypeName></Field><Field Name="Weight"><DataField>Weight</DataField><rd:TypeName>System.Int32</rd:TypeName></Field><Field Name="Goal"><DataField>Goal</DataField><rd:TypeName>System.Double</rd:TypeName></Field><Field Name="DesiredObjective"><DataField>DesiredObjective</DataField><rd:TypeName>System.String</rd:TypeName></Field><Field Name="AggregationMethod"><DataField>AggregationMethod</DataField><rd:TypeName>System.String</rd:TypeName></Field><Field Name="TotalDowntimeMilliseconds"><DataField>TotalDowntimeMilliseconds</DataField><rd:TypeName>System.Int32</rd:TypeName></Field><Field Name="ReportDurationValue"><Value>=Code.CalculateReportDurationValue(Parameters!DataAggregation.Value, Code.ToReportDate(Fields!DateTime.Value), Fields!ActualValue.Value)</Value></Field><Field Name="ReportDurationWeight"><Value>=Code.CalculateReportDurationValue(Parameters!DataAggregation.Value, Code.ToReportDate(Fields!DateTime.Value), Fields!Weight.Value)</Value></Field><Field Name="ReportDurationWeightedValue"><Value>=Code.CalculateReportDurationValue(Parameters!DataAggregation.Value, Code.ToReportDate(Fields!DateTime.Value), Fields!ActualValue.Value * Fields!Weight.Value)</Value></Field></Fields><Filters><Filter><FilterExpression>=Fields!ServiceLevelAgreementRowId.Value</FilterExpression><Operator>Equal</Operator><FilterValues><FilterValue>=Parameters!ServiceLevelAgreementRowId.Value</FilterValue></FilterValues></Filter><Filter><FilterExpression>=Fields!ServiceLevelObjectiveRowId.Value</FilterExpression><Operator>Equal</Operator><FilterValues><FilterValue>=Parameters!ServiceLevelObjectiveRowId.Value</FilterValue></FilterValues></Filter><Filter><FilterExpression>=Code.GetReportTimeFilter().Contains(Code.ToReportDate(Fields!DateTime.Value))</FilterExpression><Operator>Equal</Operator><FilterValues><FilterValue>=True</FilterValue></FilterValues></Filter></Filters></DataSet></DataSets><ReportSections><ReportSection><Body><Script><ReportItems><Tablix Name="SLOValues"><TablixBody><TablixColumns><TablixColumn><Width>0.03125in</Width></TablixColumn><TablixColumn><Width>0.03125in</Width></TablixColumn><TablixColumn><Width>0.03125in</Width></TablixColumn><TablixColumn><Width>0.03125in</Width></TablixColumn><TablixColumn><Width>0.03125in</Width></TablixColumn><TablixColumn><Width>1.15208in</Width></TablixColumn></TablixColumns><TablixRows><TablixRow><Height>0.42708in</Height><TablixCells><TablixCell><CellContents><Textbox Name="textbox3"><CanGrow>true</CanGrow><KeepTogether>true</KeepTogether><Paragraphs><Paragraph><TextRuns><TextRun><Value>=Fields!ManagementGroupRowId.Value</Value><Style /></Style></TextRun></TextRuns><Style /></Style></Paragraph></Paragraphs><rd:DefaultName>textbox3</rd:DefaultName><ZIndex>11</ZIndex><Style></Style><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><PaddingBottom>2pt</PaddingBottom></Style></Textbox></CellContents></TablixCell><TablixCell><CellContents><Textbox Name="textbox18"><CanGrow>true</CanGrow><KeepTogether>true</KeepTogether><Paragraphs><Paragraph><TextRuns><TextRun><Value>=Fields!ServiceLevelAgreementRowId.Value</Value><Style /></Style></TextRun></TextRuns><Style /></Style></Paragraph></Paragraphs><rd:DefaultName>textbox18</rd:DefaultName><ZIndex>10</ZIndex><Style></Style><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><PaddingBottom>2pt</PaddingBottom></Style></Textbox></CellContents></TablixCell><TablixCell><CellContents><Textbox Name="textbox16"><CanGrow>true</CanGrow><KeepTogether>true</KeepTogether><Paragraphs><Paragraph><TextRuns><TextRun><Value>=Fields!ServiceLevelAgreementManagedEntityRowId.Value</Value><Style /></Style></TextRun></TextRuns><Style /></Style></Paragraph></Paragraphs><rd:DefaultName>textbox16</rd:DefaultName><ZIndex>9</ZIndex><Style></Style><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><PaddingBottom>2pt</PaddingBottom></Style></Textbox></CellContents></TablixCell><TablixCell><CellContents><Textbox Name="ServiceLevelObjectiveRowId"><CanGrow>true</CanGrow><KeepTogether>true</KeepTogether><Paragraphs><Paragraph><TextRuns><TextRun><Value>=Fields!ServiceLevelObjectiveRowId.Value</Value><Style /></Style></TextRun></TextRuns><Style /></Style></Paragraph></Paragraphs><rd:DefaultName>ServiceLevelObjectiveRowId</rd:DefaultName><Style></Style><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><PaddingBottom>2pt</PaddingBottom></Style></Textbox></CellContents></TablixCell><TablixCell><CellContents><Textbox Name="ServiceLevelObjectiveManagedEntityRowId"><CanGrow>true</CanGrow><KeepTogether>true</KeepTogether><Paragraphs><Paragraph><TextRuns><TextRun><Value>=Fields!ServiceLevelObjectiveManagedEntityRowId.Value</Value><Style /></Style></TextRun></TextRuns><Style /></Style></Paragraph></Paragraphs><rd:DefaultName>ServiceLevelObjectiveManagedEntityRowId</rd:DefaultName><Style></Style><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><PaddingBottom>2pt</PaddingBottom></Style></Textbox></CellContents></TablixCell><TablixCell><CellContents><Rectangle Name="Rectangle3"><ReportItems><Textbox Name="Textbox10"><CanGrow>true</CanGrow><KeepTogether>true</KeepTogether><Paragraphs><Paragraph><TextRuns><TextRun><Value>=Code.FormatSloValue(Code.AddSloValue(Fields!ManagementGroupRowId.Value, Fields!ServiceLevelAgreementRowId.Value, Fields!ServiceLevelAgreementManagedEntityRowId.Value, Fields!ServiceLevelObjectiveRowId.Value,

IIF(Fields!AggregationMethod.Value.ToString().Equals("min", StringComparison.OrdinalIgnoreCase),
Min(Fields!ReportDurationValue.Value),
IIF(Fields!AggregationMethod.Value.ToString().Equals("max", StringComparison.OrdinalIgnoreCase),
Max(Fields!ReportDurationValue.Value),
Sum(Fields!ReportDurationWeightedValue.Value) / Sum(Fields!ReportDurationWeight.Value))),
Fields!Goal.Value, Fields!DesiredObjective.Value),Parameters!ObjectiveValueInd.Value)</Value><ActionInfo><Actions><Action><Drillthrough><ReportName>/Savision_Community_Reports_ManagementPack/Savision_Community_Reports_ManagementPack.Report.ServiceLevelAgreementOverview</ReportName></Drillthrough></Action></Actions></ActionInfo><Style></Style><FontFamily>Segoe UI Semibold</FontFamily><Color>#999999</Color></Style></TextRun></TextRuns><Style /></Style></Paragraph></Paragraphs><rd:DefaultName>Textbox10</rd:DefaultName><ActionInfo><Actions><Action><Drillthrough><ReportName>/Savision_Community_Reports_ManagementPack/Savision_Community_Reports_ManagementPack.Report.ServiceLevelAgreementOverview</ReportName><Parameters><Parameter Name="DataAggregation"><Value>=Parameters!DataAggregation.Value</Value></Parameter><Parameter Name="StartDate_BaseValue"><Value>=Parameters!StartDate_BaseValue.Value</Value></Parameter><Parameter Name="StartDate_BaseType"><Value>=Parameters!StartDate_BaseType.Value</Value></Parameter><Parameter Name="StartDate_OffsetValue"><Value>=Parameters!StartDate_OffsetValue.Value</Value></Parameter><Parameter Name="StartDate_OffsetType"><Value>=Parameters!StartDate_OffsetType.Value</Value></Parameter><Parameter Name="EndDate_BaseValue"><Value>=Parameters!EndDate_BaseValue.Value</Value></Parameter><Parameter Name="EndDate_BaseType"><Value>=Parameters!EndDate_BaseType.Value</Value></Parameter><Parameter Name="EndDate_OffsetValue"><Value>=Parameters!EndDate_OffsetValue.Value</Value></Parameter><Parameter Name="EndDate_OffsetType"><Value>=Parameters!EndDate_OffsetType.Value</Value></Parameter><Parameter Name="TimeType"><Value>=Parameters!TimeType.Value</Value></Parameter><Parameter Name="TimeWeekMap"><Value>=Parameters!TimeWeekMap.Value</Value></Parameter><Parameter Name="TimeZoneName"><Value>=Parameters!TimeZoneName.Value</Value></Parameter><Parameter Name="TimeZone"><Value>=Parameters!TimeZone.Value</Value></Parameter><Parameter Name="ServiceLevelObejctRowId"><Value>=Fields!ServiceLevelObjectiveRowId.Value</Value></Parameter><Parameter Name="ServiceLevelObjectiveManagedEntityRowId"><Value>=Fields!ServiceLevelObjectiveManagedEntityRowId.Value</Value></Parameter><Parameter Name="ServiceLevelAgreementRowId"><Value>=Fields!ServiceLevelAgreementRowId.Value</Value></Parameter><Parameter Name="LanguageCode"><Value>=Parameters!LanguageCode.Value</Value></Parameter><Parameter Name="Interactive"><Value>=Parameters!Interactive.Value</Value></Parameter><Parameter Name="ServiceLevelAgreementList"><Value>=Parameters!ServiceLevelAgreementXml.Value</Value></Parameter><Parameter Name="ManagementGroupId"><Value>=Parameters!ManagementGroupId.Value</Value></Parameter></Parameters></Drillthrough></Action></Actions></ActionInfo><Top>0.15in</Top><Left>0.35in</Left><Height>0.25in</Height><Width>0.80208in</Width><Style></Style><Border><Style></Style>None</Style></Border><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><PaddingBottom>2pt</PaddingBottom></Style></Textbox><Image Name="Image2"><Source>Embedded</Source><Value>=Code.GetSloImage(Code.GetSloCondition(Fields!ManagementGroupRowId.Value, Fields!ServiceLevelAgreementRowId.Value, Fields!ServiceLevelAgreementManagedEntityRowId.Value, Fields!ServiceLevelObjectiveRowId.Value))</Value><Sizing>FitProportional</Sizing><ActionInfo><Actions><Action><Drillthrough><ReportName>/Savision_Community_Reports_ManagementPack/Savision_Community_Reports_ManagementPack.Report.ServiceLevelAgreementOverview</ReportName><Parameters><Parameter Name="DataAggregation"><Value>=Parameters!DataAggregation.Value</Value></Parameter><Parameter Name="StartDate_BaseType"><Value>=Parameters!StartDate_BaseType.Value</Value></Parameter><Parameter Name="StartDate_BaseValue"><Value>=Parameters!StartDate_BaseValue.Value</Value></Parameter><Parameter Name="StartDate_OffsetType"><Value>=Parameters!StartDate_OffsetType.Value</Value></Parameter><Parameter Name="StartDate_OffsetValue"><Value>=Parameters!StartDate_OffsetValue.Value</Value></Parameter><Parameter Name="EndDate_BaseType"><Value>=Parameters!EndDate_BaseType.Value</Value></Parameter><Parameter Name="EndDate_BaseValue"><Value>=Parameters!EndDate_BaseValue.Value</Value></Parameter><Parameter Name="EndDate_OffsetType"><Value>=Parameters!EndDate_OffsetType.Value</Value></Parameter><Parameter Name="EndDate_OffsetValue"><Value>=Parameters!EndDate_OffsetValue.Value</Value></Parameter><Parameter Name="TimeType"><Value>=Parameters!TimeType.Value</Value></Parameter><Parameter Name="TimeWeekMap"><Value>=Parameters!TimeWeekMap.Value</Value></Parameter><Parameter Name="TimeZone"><Value>=Parameters!TimeZone.Value</Value></Parameter><Parameter Name="TimeZoneName"><Value>=Parameters!TimeZoneName.Value</Value></Parameter><Parameter Name="Interactive"><Value>=Parameters!Interactive.Value</Value></Parameter><Parameter Name="ServiceLevelAgreementList"><Value>=Parameters!ServiceLevelAgreementXml.Value</Value></Parameter><Parameter Name="LanguageCode"><Value>=Parameters!LanguageCode.Value</Value></Parameter><Parameter Name="ServiceLevelAgreementRowId"><Value>=Fields!ServiceLevelAgreementRowId.Value</Value></Parameter><Parameter Name="ServiceLevelObejctRowId"><Value>=Fields!ServiceLevelObjectiveRowId.Value</Value></Parameter><Parameter Name="ServiceLevelObjectiveManagedEntityRowId"><Value>=Fields!ServiceLevelAgreementManagedEntityRowId.Value</Value></Parameter><Parameter Name="ManagementGroupId"><Value>=Parameters!ManagementGroupId.Value</Value></Parameter></Parameters></Drillthrough></Action></Actions></ActionInfo><Top>0.16125in</Top><Left>0.02744in</Left><Height>0.26042in</Height><Width>0.32812in</Width><ZIndex>1</ZIndex><Style></Style><Border><Style></Style>None</Style></Border></Style></Image></ReportItems><KeepTogether>true</KeepTogether><Style></Style><Border><Style></Style>None</Style></Border></Style></Rectangle></CellContents></TablixCell></TablixCells></TablixRow><TablixRow><Height>0.07291in</Height><TablixCells><TablixCell><CellContents><Textbox Name="Textbox1"><CanGrow>true</CanGrow><KeepTogether>true</KeepTogether><Paragraphs><Paragraph><TextRuns><TextRun><Value /><Style /></Style></TextRun></TextRuns><Style /></Style></Paragraph></Paragraphs><rd:DefaultName>Textbox1</rd:DefaultName><Style></Style><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><PaddingBottom>2pt</PaddingBottom></Style></Textbox></CellContents></TablixCell><TablixCell><CellContents><Textbox Name="Textbox2"><CanGrow>true</CanGrow><KeepTogether>true</KeepTogether><Paragraphs><Paragraph><TextRuns><TextRun><Value /><Style /></Style></TextRun></TextRuns><Style /></Style></Paragraph></Paragraphs><rd:DefaultName>Textbox2</rd:DefaultName><Style></Style><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><PaddingBottom>2pt</PaddingBottom></Style></Textbox></CellContents></TablixCell><TablixCell><CellContents><Textbox Name="Textbox4"><CanGrow>true</CanGrow><KeepTogether>true</KeepTogether><Paragraphs><Paragraph><TextRuns><TextRun><Value /><Style /></Style></TextRun></TextRuns><Style /></Style></Paragraph></Paragraphs><rd:DefaultName>Textbox4</rd:DefaultName><Style></Style><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><PaddingBottom>2pt</PaddingBottom></Style></Textbox></CellContents></TablixCell><TablixCell><CellContents><Textbox Name="Textbox5"><CanGrow>true</CanGrow><KeepTogether>true</KeepTogether><Paragraphs><Paragraph><TextRuns><TextRun><Value /><Style /></Style></TextRun></TextRuns><Style /></Style></Paragraph></Paragraphs><rd:DefaultName>Textbox5</rd:DefaultName><Style></Style><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><PaddingBottom>2pt</PaddingBottom></Style></Textbox></CellContents></TablixCell><TablixCell><CellContents><Textbox Name="Textbox6"><CanGrow>true</CanGrow><KeepTogether>true</KeepTogether><Paragraphs><Paragraph><TextRuns><TextRun><Value /><Style /></Style></TextRun></TextRuns><Style /></Style></Paragraph></Paragraphs><rd:DefaultName>Textbox6</rd:DefaultName><Style></Style><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><PaddingBottom>2pt</PaddingBottom></Style></Textbox></CellContents></TablixCell><TablixCell><CellContents><Rectangle Name="Rectangle1"><KeepTogether>true</KeepTogether><Style></Style><Border><Style></Style>None</Style></Border></Style></Rectangle></CellContents></TablixCell></TablixCells></TablixRow></TablixRows></TablixBody><TablixColumnHierarchy><TablixMembers><TablixMember><Visibility><Hidden>true</Hidden></Visibility></TablixMember><TablixMember><Visibility><Hidden>true</Hidden></Visibility></TablixMember><TablixMember><Visibility><Hidden>true</Hidden></Visibility></TablixMember><TablixMember><Visibility><Hidden>true</Hidden></Visibility></TablixMember><TablixMember><Visibility><Hidden>true</Hidden></Visibility></TablixMember><TablixMember /></TablixMembers></TablixColumnHierarchy><TablixRowHierarchy><TablixMembers><TablixMember><Group Name="SLOValues_SLO_Group"><GroupExpressions><GroupExpression>=Fields!ManagementGroupRowId.Value</GroupExpression><GroupExpression>=Fields!ServiceLevelAgreementRowId.Value</GroupExpression><GroupExpression>=Fields!ServiceLevelAgreementManagedEntityRowId.Value</GroupExpression><GroupExpression>=Fields!ServiceLevelObjectiveRowId.Value</GroupExpression></GroupExpressions></Group><TablixMembers><TablixMember><Group Name="SLOValues_Details_Group"><GroupExpressions><GroupExpression>=Fields!ServiceLevelObjectiveManagedEntityRowId.Value</GroupExpression></GroupExpressions><DataElementName>Detail</DataElementName></Group><TablixMembers><TablixMember /><TablixMember><Visibility><Hidden>true</Hidden></Visibility></TablixMember></TablixMembers><DataElementName>Detail_Collection</DataElementName><DataElementOutput>NoOutput</DataElementOutput><KeepTogether>true</KeepTogether></TablixMember></TablixMembers></TablixMember></TablixMembers></TablixRowHierarchy><DataSetName>SLASLOData</DataSetName><Height>0.5in</Height><Width>1.30833in</Width><DataElementOutput>NoOutput</DataElementOutput><Style /></Style></Tablix></ReportItems><Height>0.5in</Height><Style /></Style></Script></Body><Width>1.30833in</Width><Page><Style /></Style></Page></ReportSection></ReportSections><ReportParameters><ReportParameter Name="DataAggregation"><DataType>Integer</DataType><DefaultValue><Values><Value>0</Value></Values></DefaultValue><Prompt>[Aggregation]</Prompt><ValidValues><ParameterValues><ParameterValue><Value>0</Value><Label>Hourly</Label></ParameterValue><ParameterValue><Value>1</Value><Label>Daily</Label></ParameterValue></ParameterValues></ValidValues></ReportParameter><ReportParameter Name="StartDate_BaseType"><DataType>String</DataType><DefaultValue><Values><Value>Today</Value></Values></DefaultValue><AllowBlank>true</AllowBlank><Prompt>[Start Date Base]</Prompt></ReportParameter><ReportParameter Name="StartDate_BaseValue"><DataType>DateTime</DataType><DefaultValue><Values><Value>12/23/2017 08:00:00</Value></Values></DefaultValue><Prompt>[From]</Prompt></ReportParameter><ReportParameter Name="StartDate_OffsetType"><DataType>String</DataType><DefaultValue><Values><Value>Day</Value></Values></DefaultValue><AllowBlank>true</AllowBlank><Prompt>[Start Date Offset Type]</Prompt></ReportParameter><ReportParameter Name="StartDate_OffsetValue"><DataType>Integer</DataType><DefaultValue><Values><Value>-1</Value></Values></DefaultValue><Prompt>[Start Date Offset]</Prompt></ReportParameter><ReportParameter Name="EndDate_BaseType"><DataType>String</DataType><DefaultValue><Values><Value>Today</Value></Values></DefaultValue><AllowBlank>true</AllowBlank><Prompt>[End Date Base]</Prompt></ReportParameter><ReportParameter Name="EndDate_BaseValue"><DataType>DateTime</DataType><DefaultValue><Values><Value>12/25/2017 17:00:00</Value></Values></DefaultValue><Prompt>[To]</Prompt></ReportParameter><ReportParameter Name="EndDate_OffsetType"><DataType>String</DataType><DefaultValue><Values><Value>None</Value></Values></DefaultValue><AllowBlank>true</AllowBlank><Prompt>[End Date Offset Type]</Prompt></ReportParameter><ReportParameter Name="EndDate_OffsetValue"><DataType>Integer</DataType><DefaultValue><Values><Value>0</Value></Values></DefaultValue><Prompt>[End Date Offset]</Prompt></ReportParameter><ReportParameter Name="TimeType"><DataType>String</DataType><DefaultValue><Values><Value>Business</Value></Values></DefaultValue><AllowBlank>true</AllowBlank><Prompt>[Time Type]</Prompt></ReportParameter><ReportParameter Name="TimeWeekMap"><DataType>String</DataType><DefaultValue><Values><Value>Monday, Tuesday, Wednesday, Thursday, Friday</Value></Values></DefaultValue><Prompt>[Week Days]</Prompt><MultiValue>true</MultiValue></ReportParameter><ReportParameter Name="TimeZone"><DataType>String</DataType><DefaultValue><Values><Value>88FFFFFF00000000C4FFFFFF00000A0000000500020000000000000000000300050004000200000000000000</Value></Values></DefaultValue><Prompt>[Time Zone]</Prompt></ReportParameter><ReportParameter Name="TimeZoneName"><DataType>String</DataType><Nullable>true</Nullable><DefaultValue><Values><Value>(UTC+02:00) Jerusalem</Value></Values></DefaultValue><AllowBlank>true</AllowBlank><Prompt>[Time Zone Name]</Prompt></ReportParameter><ReportParameter Name="Interactive"><DataType>Boolean</DataType><Nullable>true</Nullable><DefaultValue><Values><Value>=False</Value></Values></DefaultValue><Prompt>Interactive</Prompt><Hidden>true</Hidden></ReportParameter><ReportParameter Name="ServiceLevelAgreementXml"><DataType>String</DataType><DefaultValue><Values><Value>&lt;Data&gt;&lt;ServiceLevelAgreements&gt;&lt;ServiceLevelAgreement ManagementGroupGuid="7c592501-a053-6a2e-766d-665253812dca" ServiceLevelAgreementGuid="69feed40-12a3-ec62-9e51-217c89b4dfa5" /&gt;&lt;/ServiceLevelAgreements&gt;&lt;/Data&gt;</Value></Values></DefaultValue><Prompt>Service Level Agreement Xml</Prompt></ReportParameter><ReportParameter Name="LanguageCode"><DataType>String</DataType><DefaultValue><Values><Value>ENU</Value></Values></DefaultValue><Prompt>Language Code</Prompt></ReportParameter><ReportParameter Name="ServiceLevelAgreementRowId"><DataType>Integer</DataType><Nullable>true</Nullable><DefaultValue><Values><Value xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /></Values></DefaultValue><Prompt>ServiceLevelAgreementRowId</Prompt></ReportParameter><ReportParameter Name="ServiceLevelObjectiveRowId"><DataType>Integer</DataType><Nullable>true</Nullable><DefaultValue><Values><Value xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /></Values></DefaultValue><Prompt>ServiceLevelObjectiveRowId</Prompt></ReportParameter><ReportParameter Name="ObjectiveValueInd"><DataType>String</DataType><AllowBlank>true</AllowBlank><Prompt>ObjectiveValueInd</Prompt></ReportParameter><ReportParameter Name="TimeInterval"><DataType>String</DataType><DefaultValue><Values><Value>Report Duration</Value></Values></DefaultValue><AllowBlank>true</AllowBlank><Prompt>TimeInterval</Prompt><Hidden>true</Hidden><MultiValue>true</MultiValue></ReportParameter><ReportParameter Name="ManagementGroupId"><DataType>String</DataType><Prompt>ManagementGroupId</Prompt></ReportParameter></ReportParameters><Code><Script>
Const LocTableStringQuery As String = "R/S[@N='{0}']/text()"

Const TimeZoneParameterName As String = "TimeZone"
Const SD_BaseTypeParameterName As String = "StartDate_BaseType"
Const SD_BaseValueParameterName As String = "StartDate_BaseValue"
Const SD_OffsetTypeParameterName As String = "StartDate_OffsetType"
Const SD_OffsetValueParameterName As String = "StartDate_OffsetValue"
Const ED_BaseTypeParameterName As String = "EndDate_BaseType"
Const ED_BaseValueParameterName As String = "EndDate_BaseValue"
Const ED_OffsetTypeParameterName As String = "EndDate_OffsetType"
Const ED_OffsetValueParameterName As String = "EndDate_OffsetValue"
Const IsRelativeTimeSupported As Boolean = True
Const TimeTypeParameterName As String = "TimeType"
Const TimeWeekMapParameterName As String = "TimeWeekMap"
Const DataAggregationParameterName As String = "DataAggregation"

Dim LocTables As System.Collections.Generic.Dictionary(Of String, Microsoft.EnterpriseManagement.Reporting.XmlStringTable)
Dim ReportTimeZone As Microsoft.EnterpriseManagement.Reporting.TimeZoneCoreInformation
Dim ReportStartDate As DateTime
Dim ReportEndDate As DateTime
Dim ReportTime As Microsoft.EnterpriseManagement.Reporting.ParameterProcessor.RelativeTime
Dim ReportCulture As System.Globalization.CultureInfo
Dim ParameterProcessor As Microsoft.EnterpriseManagement.Reporting.ParameterProcessor
Dim InitLock As New Object

Const TimeIntervalCount As Integer = 6
Const TimeIntervalParameterName As String = "TimeInterval"

Dim TimeIntervalTable(TimeIntervalCount - 1) As Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval
Dim TimeIntervalParameterTable As System.Collections.Generic.List(Of String)
Dim SlaTable As System.Collections.Generic.Dictionary(Of SlaIdentity, System.Collections.Generic.Dictionary(Of Integer, SloValue))


Protected Overrides Sub OnInit()
LocTables = new System.Collections.Generic.Dictionary(Of String, Microsoft.EnterpriseManagement.Reporting.XmlStringTable)()
ReportTimeZone = Nothing
ReportStartDate = DateTime.MinValue
ReportEndDate = DateTime.MinValue
ReportTime = Nothing
ReportCulture = System.Globalization.CultureInfo.GetCultureInfo(Report.User("Language"))
ParameterProcessor = New Microsoft.EnterpriseManagement.Reporting.ParameterProcessor(ReportCulture)

SlaTable = New System.Collections.Generic.Dictionary(Of SlaIdentity, System.Collections.Generic.Dictionary(Of Integer, SloValue))()
End Sub

Public Function GetCallingManagementGroupId() As String
Return Microsoft.EnterpriseManagement.Reporting.ReportingConfiguration.ManagementGroupId
End Function

Public Function GetReportLocLanguageCode() As String
Return ReportCulture.ThreeLetterWindowsLanguageName
End Function

Public Function GetLocTable(Name As String) As Microsoft.EnterpriseManagement.Reporting.XmlStringTable
Dim LocTable As Microsoft.EnterpriseManagement.Reporting.XmlStringTable

If Not LocTables.TryGetValue(Name, LocTable) Then
LocTable = New Microsoft.EnterpriseManagement.Reporting.XmlStringTable(LocTableStringQuery, Report.Parameters(Name).Value)
LocTables.Add(Name, LocTable)
End If

Return LocTable
End Function

Public Function GetReportTimeZone() As Microsoft.EnterpriseManagement.Reporting.TimeZoneCoreInformation
SyncLock InitLock
If IsNothing(ReportTimeZone) Then ReportTimeZone = Microsoft.EnterpriseManagement.Reporting.TimeZoneCoreInformation.FromValueString(Report.Parameters(TimeZoneParameterName).Value)
Return ReportTimeZone
End SyncLock
End Function

Public Function ToDbDate(ByVal DateValue As DateTime) As DateTime
return GetReportTimeZone.ToUniversalTime(DateValue)
End Function

Public Function ToReportDate(ByVal DateValue As DateTime) As DateTime
return GetReportTimeZone.ToLocalTime(DateValue)
End Function

Public Function GetReportStartDate() As DateTime
SyncLock InitLock
If (ReportStartDate = DateTime.MinValue) Then
If (IsRelativeTimeSupported) Then
ReportStartDate = ParameterProcessor.GetDateTime(ToReportDate(DateTime.UtcNow), Report.Parameters(SD_BaseTypeParameterName).Value, Report.Parameters(SD_BaseValueParameterName).Value, Report.Parameters(SD_OffsetTypeParameterName).Value, Report.Parameters(SD_OffsetValueParameterName).Value, Report.Parameters(TimeTypeParameterName).Value)
Else
ReportStartDate = ParameterProcessor.GetDateTime(ToReportDate(DateTime.UtcNow), Report.Parameters(SD_BaseTypeParameterName).Value, Report.Parameters(SD_BaseValueParameterName).Value, Report.Parameters(SD_OffsetTypeParameterName).Value, Report.Parameters(SD_OffsetValueParameterName).Value)
End if

If (CInt(Report.Parameters(DataAggregationParameterName).Value) &gt; 0) Then
ReportStartDate = ReportStartDate.Date
End If
End If
return ReportStartDate
End SyncLock
End Function

Public Function GetReportEndDate() As DateTime
SyncLock InitLock
If (ReportEndDate = DateTime.MinValue) Then
If (IsRelativeTimeSupported) Then
ReportEndDate = ParameterProcessor.GetDateTime(ToReportDate(DateTime.UtcNow), Report.Parameters(ED_BaseTypeParameterName).Value, Report.Parameters(ED_BaseValueParameterName).Value, Report.Parameters(ED_OffsetTypeParameterName).Value, Report.Parameters(ED_OffsetValueParameterName).Value, Report.Parameters(TimeTypeParameterName).Value)
If IsBusinessHours(GetReportTimeFilter()) Then ReportEndDate = ReportCulture.Calendar.AddDays(ReportEndDate, 1)
Else
ReportEndDate = ParameterProcessor.GetDateTime(ToReportDate(DateTime.UtcNow), Report.Parameters(ED_BaseTypeParameterName).Value, Report.Parameters(ED_BaseValueParameterName).Value, Report.Parameters(ED_OffsetTypeParameterName).Value, Report.Parameters(ED_OffsetValueParameterName).Value)
End if

If (CInt(Report.Parameters(DataAggregationParameterName).Value) &gt; 0) Then
ReportEndDate = ReportEndDate.Date
End If
End If
return ReportEndDate
End SyncLock
End Function

Public Function GetReportTimeFilter() As Microsoft.EnterpriseManagement.Reporting.ParameterProcessor.RelativeTime
SyncLock InitLock
If IsNothing(ReportTime) Then
If (CInt(Report.Parameters(DataAggregationParameterName).Value) = 0)
ReportTime = New Microsoft.EnterpriseManagement.Reporting.ParameterProcessor.RelativeTime(Report.Parameters(TimeTypeParameterName).Value, Report.Parameters(SD_BaseValueParameterName).Value, Report.Parameters(ED_BaseValueParameterName).Value, CStr(Join(Report.Parameters(TimeWeekMapParameterName).Value, ",")))
Else
ReportTime = New Microsoft.EnterpriseManagement.Reporting.ParameterProcessor.RelativeTime(Microsoft.EnterpriseManagement.Reporting.ParameterProcessor.RelativeTimeType.Regular, Report.Parameters(SD_BaseValueParameterName).Value, Report.Parameters(ED_BaseValueParameterName).Value, CStr(Join(Report.Parameters(TimeWeekMapParameterName).Value, ",")))
End if
End If
return ReportTime
End SyncLock
End Function

Public Function IsBusinessHours(Value As Microsoft.EnterpriseManagement.Reporting.ParameterProcessor.RelativeTime) As Boolean
return (Not IsNothing(Value)) And (Value.TimeType = Microsoft.EnterpriseManagement.Reporting.ParameterProcessor.RelativeTimeType.Business)
End Function

Public Function FormatDateTime(Format As String, Value As DateTime) As String
return Value.ToString(Format, ReportCulture)
End Function

Public Function FormatNumber(Format As String, Value As Decimal) As String
return Value.ToString(Format, ReportCulture)
End Function

Public Function FormatString(Format As String, ParamArray Values() as Object) As String
return String.Format(ReportCulture, Format, Values)
End Function

Public Function NullFormatString(Format As String, Value as String) As String
return IIF(String.IsNullOrEmpty(Value), String.Empty, String.Format(ReportCulture, Format, Value))
End Function

Public Function FormatBusinessHours(Format As String, Value As Microsoft.EnterpriseManagement.Reporting.ParameterProcessor.RelativeTime) As String
Dim result As String

If IsBusinessHours(Value) Then

Dim firstDay As DayOfWeek
Dim days As System.Collections.Generic.List(Of String)

firstDay = ReportCulture.DateTimeFormat.FirstDayOfWeek
days = new System.Collections.Generic.List(Of String)()

For loopDay As DayOfWeek = DayOfWeek.Sunday To DayOfWeek.Saturday
Dim day As DayOfWeek
day = CType((CInt(loopDay) + CInt(firstDay)) Mod 7, DayOfWeek)

If value.WeekMap.Contains(day) Then days.Add(ReportCulture.DateTimeFormat.GetAbbreviatedDayName(day))
Next loopDay

result = FormatString(Format, DateTime.Today.Add(Value.StartTime).ToString(ReportCulture.DateTimeFormat.ShortTimePattern), DateTime.Today.Add(Value.EndTime).ToString(ReportCulture.DateTimeFormat.ShortTimePattern), String.Join(",", days.ToArray()))

Else
result = String.Empty
End if

return result
End Function

REM ---------------------------------

Public Enum DataAggregationType
Hourly = 0
Daily = 1
End Enum

Public Function GetDBDataAggregationTypeId(ByVal aggregation As DataAggregationType) As Integer
Select Case aggregation
Case DataAggregationType.Hourly
Return 20
Case DataAggregationType.Daily
Return 30
Case Else
Return 0
End Select
End Function

Public Function NormalizeDateValue(ByVal aggregation As DataAggregationType, ByVal Value As DateTime) As DateTime
Dim Result As DateTime = Value.Date.AddHours(Value.Hour)
If aggregation = DataAggregationType.Daily Then
Result = Result.AddHours(1)
End If
Return Result
End Function


REM ---------------------------------

Public Enum SloObjectiveType
Under = 0
Over = 1
End Enum

Public Class SloValue

Private CurrentValue As Double

Private RelatedValueTable() As Double = New Double() {}

Public ReadOnly Goal As Double

Public ReadOnly Objective As SloObjectiveType

Public Sub New(ByVal SloValue As Double, ByVal SloGoal As Double, ByVal SloObjective As SloObjectiveType)
CurrentValue = SloValue
Goal = SloGoal
Objective = SloObjective
End Sub

Public Sub New(ByVal SloValue As Double, ByVal SloGoal As Double, ByVal SloObjective As String)
CurrentValue = SloValue
Goal = SloGoal
Objective = [Enum].Parse(GetType(SloObjectiveType), SloObjective, True)
End Sub

Public ReadOnly Property Value() As Double
Get
Return CurrentValue
End Get
End Property

Public ReadOnly Property RelatedValues() As Double()
Get
Return RelatedValueTable
End Get
End Property

Public Function IsGoalMet() As Boolean
Return IIf(Objective = SloObjectiveType.Under, CurrentValue &lt;= Goal, CurrentValue &gt;= Goal)
End Function

Public Function IsRelatedGoalMet(ByVal Index As Integer) As Nullable(Of Boolean)
Dim RelatedValue As Double = RelatedValues(Index)
If Double.IsNaN(RelatedValue) Then
Return Nothing
Else
Return New Nullable(Of Boolean)(IIf(Objective = SloObjectiveType.Under, RelatedValue &lt;= Goal, RelatedValue &gt;= Goal))
End If
End Function

Public Sub CollectValue(ByVal NewValue As Double)
Select Case Objective

Case SloObjectiveType.Over
If (NewValue &lt; CurrentValue) Then
CurrentValue = NewValue
End If

Case SloObjectiveType.Under
If (NewValue &gt; CurrentValue) Then
CurrentValue = NewValue
End If

End Select
End Sub

Public Sub CollectRelatedValue(ByVal Index As Integer, ByVal NewValue As Double)
If Index &gt;= RelatedValues.Length Then
ReDim Preserve RelatedValueTable(Index)
RelatedValues(Index) = Double.NaN
End If

If Not Double.IsNaN(NewValue) Then
If Double.IsNaN(RelatedValues(Index)) Then

RelatedValues(Index) = NewValue
Else
Select Case Objective
Case SloObjectiveType.Over
If (NewValue &lt; RelatedValues(Index)) Then
RelatedValues(Index) = NewValue
End If

Case SloObjectiveType.Under
If (NewValue &gt; RelatedValues(Index)) Then
RelatedValues(Index) = NewValue
End If
End Select
End If
End If
End Sub

End Class

REM ---------------------------------

Public Class SlaIdentity
Implements IEquatable(Of SlaIdentity)

Public ReadOnly Id As Integer

Public ReadOnly GroupId As Integer

Public ReadOnly ObjectId As Integer

Public Sub New(ByVal ManagementGroupId As Integer, ByVal SlaId As Integer, ByVal SlaObjectId As Integer)
Id = SlaId
GroupId = ManagementGroupId
ObjectId = SlaObjectId
End Sub

Public Overloads Function Equals(ByVal other As SlaIdentity) As Boolean Implements System.IEquatable(Of SlaIdentity).Equals
Return Id = other.Id And ObjectId = other.ObjectId And GroupId = other.GroupId
End Function

Public Overrides Function GetHashCode() As Integer
Return (GroupId &lt;&lt; 25) Or (Id &lt;&lt; 14) Or ObjectId
End Function

End Class

REM ---------------------------------

Public Function AddSloValue(ByVal ManagementGroup As Integer, ByVal Sla As Integer, ByVal SlaObject As Integer, ByVal Slo As Integer, ByVal Value As Double, ByVal Goal As Double, ByVal Objective As String) As Double
Dim CurrentValue As SloValue = Nothing
Dim SloTable As System.Collections.Generic.Dictionary(Of Integer, SloValue) = Nothing
Dim SlaId As SlaIdentity = New SlaIdentity(ManagementGroup, Sla, SlaObject)

If Not SlaTable.TryGetValue(SlaId, SloTable) Then
SloTable = New System.Collections.Generic.Dictionary(Of Integer, SloValue)()
SlaTable.Add(SlaId, SloTable)
End If

If Not SloTable.TryGetValue(Slo, CurrentValue) Then
CurrentValue = New SloValue(Value, Goal, Objective)
SloTable.Add(Slo, CurrentValue)
Else
CurrentValue.CollectValue(Value)
End If

Return CurrentValue.Value
End Function

Public Function AddRelatedSloValue(ByVal ManagementGroup As Integer, ByVal Sla As Integer, ByVal SlaObject As Integer, ByVal Slo As Integer, ByVal Value As Object, ByVal Index As Integer) As Double
Dim SloVal As SloValue = SlaTable(New SlaIdentity(ManagementGroup, Sla, SlaObject))(Slo)
SloVal.CollectRelatedValue(Index, IIf(IsNothing(Value), Double.NaN, CDbl(Value)))
Return SloVal.RelatedValues(Index)
End Function

Public Function GetSlo(ByVal ManagementGroup As Integer, ByVal Sla As Integer, ByVal SlaObject As Integer, ByVal Slo As Integer) As SloValue
Dim SlaId As SlaIdentity = New SlaIdentity(ManagementGroup, Sla, SlaObject)
If SlaTable.ContainsKey(SlaId) Then
Dim Value As SloValue = Nothing
If SlaTable(SlaId).TryGetValue(Slo, Value) Then
Return Value
Else
Return Nothing
End If
Else
Return Nothing
End If
End Function

Public Function GetSloValue(ByVal ManagementGroup As Integer, ByVal Sla As Integer, ByVal SlaObject As Integer, ByVal Slo As Integer) As Double
Dim Value As SloValue = GetSlo(ManagementGroup, Sla, SlaObject, Slo)
If IsNothing(Value) Then
Return Double.NaN
Else
Return Value.Value
End If
End Function

Public Function GetRelatedSloValue(ByVal ManagementGroup As Integer, ByVal Sla As Integer, ByVal SlaObject As Integer, ByVal Slo As Integer, ByVal Index As Integer) As Double
Dim Value As SloValue = GetSlo(ManagementGroup, Sla, SlaObject, Slo)
If IsNothing(Value) Then
Return Double.NaN
Else
Return Value.RelatedValues(Index)
End If
End Function

Public Function GetSloCondition(ByVal ManagementGroup As Integer, ByVal Sla As Integer, ByVal SlaObject As Integer, ByVal Slo As Integer) As Nullable(Of Boolean)
Dim Value As SloValue = GetSlo(ManagementGroup, Sla, SlaObject, Slo)
If IsNothing(Value) Then
Return Nothing
Else
Return Value.IsGoalMet()
End If
End Function

Public Function GetRelatedSloCondition(ByVal ManagementGroup As Integer, ByVal Sla As Integer, ByVal SlaObject As Integer, ByVal Slo As Integer, ByVal Index As Integer) As Nullable(Of Boolean)
Dim Value As SloValue = GetSlo(ManagementGroup, Sla, SlaObject, Slo)
If IsNothing(Value) Then
Return Nothing
Else
Return Value.IsRelatedGoalMet(Index)
End If
End Function

Public Function GetSlaCondition(ByVal ManagementGroup As Integer, ByVal Sla As Integer, ByVal SlaObject As Integer) As Nullable(Of Boolean)
Dim SlaId As SlaIdentity = New SlaIdentity(ManagementGroup, Sla, SlaObject)
Dim Result As Nullable(Of Boolean) = Nothing

If SlaTable.ContainsKey(SlaId) Then
For Each Value As SloValue In SlaTable(SlaId).Values
If (Not Value.IsGoalMet()) Then
Return False
Else
Result = True
End If
Next
End If

Return Result
End Function

Public Function GetRelatedSlaCondition(ByVal ManagementGroup As Integer, ByVal Sla As Integer, ByVal SlaObject As Integer, ByVal Index As Integer) As Nullable(Of Boolean)
Dim SlaId As SlaIdentity = New SlaIdentity(ManagementGroup, Sla, SlaObject)
Dim Result As Nullable(Of Boolean) = Nothing

If SlaTable.ContainsKey(SlaId) Then
For Each Value As SloValue In SlaTable(SlaId).Values
If Not IsNothing(Value.IsRelatedGoalMet(Index)) Then
If (Not Value.IsRelatedGoalMet(Index).Value) Then
Return False
Else
Result = True
End If
End If
Next
End If

Return Result
End Function

Public Function GetMaxSloValue(ByVal ManagementGroup As Integer, ByVal Sla As Integer, ByVal SlaObject As Integer, ByVal Slo As Integer) As Double
Dim Value As SloValue = GetSlo(ManagementGroup, Sla, SlaObject, Slo)
Dim Result As Double = Double.NaN

If Not IsNothing(Value) Then
Result = Value.Goal

If Value.Value &gt; Result Then
Result = Value.Value
End If

For Each RelatedValue As Double In Value.RelatedValues
If RelatedValue &gt; Result Then
Result = RelatedValue
End If
Next
End If

Return Result
End Function

Public Function GetMinSloValue(ByVal ManagementGroup As Integer, ByVal Sla As Integer, ByVal SlaObject As Integer, ByVal Slo As Integer) As Double
Dim Value As SloValue = GetSlo(ManagementGroup, Sla, SlaObject, Slo)
Dim Result As Double = 0

If Not IsNothing(Value) Then
If Value.Goal &lt; Result Then
Result = Value.Goal
End If

If Value.Value &lt; Result Then
Result = Value.Value
End If

For Each RelatedValue As Double In Value.RelatedValues
If RelatedValue &lt; Result Then
Result = RelatedValue
End If
Next
End If

Return Result
End Function

REM ---------------------------------

Public Function GetTimeIntervalParameterTable() As System.Collections.Generic.IList(Of String)
If IsNothing(TimeIntervalParameterTable) Then
TimeIntervalParameterTable = New System.Collections.Generic.List(Of String)()

For Each Value As String In Report.Parameters(TimeIntervalParameterName).Value
If Not IsNothing(Value) Then
If Not String.IsNullOrEmpty(Value.Trim()) Then
TimeIntervalParameterTable.Add(Value)
End If
End If
Next
End If

Return TimeIntervalParameterTable
End Function

Public Function GetTimeInterval(ByVal Index As Integer) As Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval
Dim Value As Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval = Nothing

If (Index &gt;= 0) And (Index &lt; TimeIntervalCount) Then
Value = TimeIntervalTable(Index)

If IsNothing(Value) Then
If GetTimeIntervalParameterTable().Count &gt; Index Then
Value = New Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval(GetReportEndDate(), GetTimeIntervalParameterTable()(Index), ReportCulture)
TimeIntervalTable(Index) = Value
End If
End If
End If

Return Value
End Function

Public Function GetTimeIntervalTitle(ByVal Index As Integer) As String
Dim Interval As Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval
Interval = GetTimeInterval(Index)
If IsNothing(Interval) Then
Return Nothing
Else
Return Interval.Title
End If
End Function

Public Function IsTimeIntervalContains(ByVal Index As Integer, ByVal Value As DateTime) As Boolean
Dim Interval As Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval
Interval = GetTimeInterval(Index)
If IsNothing(Interval) Then
Return False
Else
Return Interval.Contains(Value)
End If
End Function

Public Function IsTimeIntervalHidden(ByVal Index As Integer) As Boolean
Dim Interval As Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval
Interval = GetTimeInterval(Index)
Return IsNothing(Interval)
End Function

Public Function CalculateTimeIntervalValue(ByVal Index As Integer, ByVal aggregation As DataAggregationType, ByVal IntervalDate As DateTime, ByVal Value As Object) As Object
Dim Interval As Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval
Interval = GetTimeInterval(Index)
If IsNothing(Interval) Then
Return System.DBNull.Value
Else
If ((IntervalDate &gt;= NormalizeDateValue(aggregation, Interval.StartDate)) and (IntervalDate &lt; NormalizeDateValue(aggregation, Interval.EndDate))) Then
Return Value
Else
Return System.DBNull.Value
End If
End If
End Function

Public Function GetTimeIntervalParameterStartDate(ByVal Index As Integer) As DateTime
Dim Result As DateTime = GetTimeIntervalStartDate(Index)
If IsBusinessHours(GetReportTimeFilter()) Then
Result = Result.Date + GetReportTimeFilter().StartTime
End If
Return Result
End Function

Public Function GetTimeIntervalParameterEndDate(ByVal Index As Integer) As DateTime
Dim Result As DateTime = GetTimeIntervalEndDate(Index)
If IsBusinessHours(GetReportTimeFilter()) Then
Result = Result.Date.AddDays(-1) + GetReportTimeFilter().EndTime
End If
Return Result
End Function

Public Function GetTimeIntervalStartDate(ByVal Index As Integer) As Date
Dim Interval As Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval
Interval = GetTimeInterval(Index)
If IsNothing(Interval) Then
Return Nothing
Else
Return Interval.StartDate
End If
End Function

Public Function GetTimeIntervalEndDate(ByVal Index As Integer) As Date
Dim Interval As Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval
Interval = GetTimeInterval(Index)
If IsNothing(Interval) Then
Return Nothing
Else
Return Interval.EndDate
End If
End Function

Public Function GetReportMinStartDate() As DateTime
Dim Index As Integer
Dim MinStartDate As DateTime = GetReportStartDate()
Dim Interval As Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval

For Index = 0 To TimeIntervalCount - 1
Interval = GetTimeInterval(Index)
If (Not IsNothing(Interval)) Then
If (Interval.StartDate &lt; MinStartDate) Then
MinStartDate = Interval.StartDate
End If
End If
Next
Return MinStartDate
End Function

Public Function GetReportMaxEndDate() As DateTime
Dim Index As Integer
Dim MaxEndDate As DateTime = GetReportEndDate()
Dim Interval As Microsoft.EnterpriseManagement.Reporting.ParameterTimeInterval

For Index = 0 To TimeIntervalCount - 1
Interval = GetTimeInterval(Index)
If (Not IsNothing(Interval)) Then
If (Interval.EndDate &gt; MaxEndDate) Then
MaxEndDate = Interval.EndDate
End If
End If
Next
Return MaxEndDate
End Function

Public Function CalculateReportDurationValue(ByVal aggregation As DataAggregationType, ByVal IntervalDate As DateTime, ByVal Value As Object) As Object
If ((IntervalDate &gt;= NormalizeDateValue(aggregation, GetReportStartDate())) and (IntervalDate &lt; NormalizeDateValue(aggregation, GetReportEndDate()))) Then
Return Value
Else
Return System.DBNull.Value
End If
End Function

REM ---------------------------------

Public Enum SloValueType
Number = 0
Percent = 1
End Enum

Public Function FormatSloValue(ByVal Value As Object, ByVal ValueType As SloValueType) As String
If Double.IsNaN(Value) Then
Return String.Empty
Else
Select Case ValueType
Case SloValueType.Number
Return FormatNumber("G12", Value)
Case SloValueType.Percent
IF(Value Mod 100 = 0)
Return FormatNumber("P0", Value/100)
Else
Return FormatNumber("P2", Value/100)
End If
End Select
End If
End Function

Public Function GetSloImage(ByVal Value As Nullable(Of Boolean)) As String
If IsNothing(Value) Then
Return "Error"
Else
Return IIF(Value.Value, "Ok", "Error")
End If
End Function

Public Function GetSlaImage(ByVal Value As Nullable(Of Boolean)) As String
If IsNothing(Value) Then
Return "NoDataLarge.gif"
Else
Return IIF(Value.Value, "TrueLarge.gif", "FalseLarge.gif")
End If
End Function

</Script></Code><EmbeddedImages><EmbeddedImage Name="Error"><MIMEType>image/png</MIMEType><ImageData>iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAS8SURBVGiB7ZldbBRVFMd/Z2Y/SksNtCFEJIIJKkK1D1AxSnGhaOhDebCNPvhgYqI+YBEjqGlLaNrCA5I01kbDuzEogomQQAgFBVHJ2igg4JMkihhJVGLpx3Rn5vrQTdndmWXu7G79SPt/PPfcc/7/uefeO/demMEMpjekFEFUJ8boqZUrXZF6MOrAXYbIwmwnfga5DG5S4FR5fXJQOnGLzV2UgJHEqoWuqVqBZ4G7Qna/ipL3DYz+8hNf/VIoh4IE3Fi9em60bLxLKV4A4oUmT8MC2ZtyrB1zP/vuRtjOoQUMra97WlzpR5gXtm8AflMimyqPnz0QppO2ALViRfTmHKNfkBfDcwtDSN4tv2FvkcHBlJ6/Bq4nErPLIyMHUDxZHD1tHK0wx1rk2PnhIEcjyEE1LomXGyOH/0HyABuGnfhh1bgkcH4FChixqnoRHi8NrzCQxPB49e5Ar9s1DjXUPSPIvtKRCg8l0nK7iZ1XwPATjy1QbuoycMeUMNPHH8qMPFB57Mvrfo15S0i5qS7+ffIAVTh2V75GXwGjiUcWA89ppzAMzJpabXezphaMwOk3CYHnR9c9usg3tZ/RMdRLQESPjUl8+y7KevcSaXoq0D3a1ExZ717iHTvBNLVSAFFbbN/9xzMHVCIRGTZHrgLzA8OaJvH2HiJr1qU7K6y+3diHDuYlH9u8DWQirf35ANau7eA4GhrUtYqqxXfL/v1Zzp4RGDKGH9YiD5hLa4isTtwyiBBv3UakYYPHN7K+kVjr1knyAJH6tRhLl+ukAmTB6O9XVuRaPQJMZK1mRJyL57B62sG2MyIaxN/sJNrUPGmKNjUTf2NHdt3bNlZ3G+7F
87rpcDE83Dx17gorw/zh2adOABBv64ZIOpzIRKmkkVk2E51srJ0d2KdPhsgEIqou1+YRIHBvqKikRShFvL0nW8Qrr4NSJSEPoOC+XJvfKnRn6MiAffok1s6O7HKCkpFPB/Nw8xMwu8Dot0S4PidF1y2SPACVuQY/AUUdM2VOVfZXn2yQibYSw0/AUKHBctf5LKQndubqVAA83PwE/FpI5OjGFi95xwE3Y98pWoTycPMIENQPYcNGN7Z4NilsG6unHas7Z58oQoSIeLh5R0DJt2GC5iWfnrC+q1OBIpTLYK7NI8BBaS8T5vJaYi+/lk3edbHe6s5abezTJ7H29GSvTiLEWrdiLH9IW4CB6+HmEVC5Jvk18JNOQOfSeVKHM37cbBurqw174KjH1z5+BKu7LWskUocO4l66oEVewY+zTnyTDBQgnbgo+UAvqmL8nT2kDh1I13wH9hf5BzCznFKffsx4/56JnVoP+wQ8zr5r/s2GVfNBXQFmaYU2DMxlD+J8f07L3aypxbl0wX/D88eIMiP3+B0r85+JG+r6FbJJN8PUQr09eyC5xa8l77luLGa0UeCeUFqoa6Njse35WvMKqD5y9i+FenVqSOlDibF53pkzef8ObnuyrhxIfiiK90pPSxfSF3TZG3g1UF69qFXBJ6UjpQdRcrCi/mxgBfzvL3enx/V6Jv5rDxz612NpVB5PfmSPx+4XoR+wwvb3gQXSl3LGl4YlD9P1kS8XeZ9ZFXPTWf6cqmfWGcxguuNvzkHX+0Q7uaoAAAAASUVORK5CYII=</ImageData></EmbeddedImage><EmbeddedImage Name="Ok"><MIMEType>image/png</MIMEType><ImageData>iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAT+SURBVGiB7ZlLbFRVGMd/350O5amBQFtKpzEgTB9Amb5MNEZMFC2PdlooatzoQlgYjG5NjBOWblRCMLA2fYClBRqquMC4MAzQSGyhJZQmCrR0aAYVSzPMzD0uQEvn3Jl7ZzqQKP0vz/nOd37/ex73nnNhVrN6siXZSBIIBIzzFReqFbwoUCNQpqBoWpCSa4gaUHDOMI0fq/rW9wYCAXOmfc/IQF1HU5HLMPeg5G1ErUiz+XVEfY0rvr97W/eNTBkyMrCle8tiibr3Au8BuZl2/kARRB3MUfJpV2PX7+k2TtvAtk7/TgX7gWXptrXRmMD7Jxq7OtJp5NhA1cFd7sK80H4Fu9Jncy4FB26G8j7s3X0o6iTekYHmw80LJ93RDmDTjOgcSkR9G5k3uePUa6cmbGPtAupO1uW6IrnfAS9lhc65fojnRl7v2dwTSRVk2GXJieR+zuOHB9joujfnM7uglCOwtavhDZS0ZY8pfQnsSLWwkxqoP1ZfaJrGAPDUIyFzrrBbSWlnU2fIqjLpFIqbxl4eI/ziBXOTVS25B3uTVVqOgL/T/0wMrgA5WWCz1dqiPLZXlfLT0DW+vzis1QtE46ax+uT2o78m1lmOQEzUbh4T/LqifLZXlSIivLC6mE1rV2kxCtwuUZbvH83AxtMbc1Dy7iNg1eQtWIq/sgSRqYlQu3IFSxfN12KVqHeaDze7Ess1Awv+eLoWyM8yq6b1njzefK4clzEFH4ubtJzpY/zOXasmhZPuaFVioWbAMI2Xs0pqoQpPPo2VpdOefCxu0hLsYzh0O2k7JUpj0wwoUdXZArVShSdfmzZO4AFESU1imb6IlazOAqelksG3Bvtt
4QEE1iSW6QZELXcKtGTBPKehlBYuo943HT5uKo6cu8TVUNhRDgUam9U2utBJslfLV7LnlVrWFdmv9wpPATtryiwX7OWb4066+0eLEgu0vV5AlE2WTWtX8fyzHgCaqkoQUfxyzfJNT4WnAH+lV5s2bcF+x08+lfRFDHdSNVi2aD61K6eOvyJCg6+UssKlWmz5ijwaEuDjpqLj/ABDmcFrbFaLeDRVhlt37tJypo9YfOpCwWUIzTXlVHgK/i3bUFzAjuoyDO3J9zEweisTeAQ0NqtFPGiXaDh0m9Zg/zQTIoK/0suG4gI2FBfQ4CvhIXZicZP2s/1cGZvBtBE0Ns2AKPnZSa6roTDfnL9E3JxaMSJCvc9Lg887DT5uKjp6B2YGD5io3sQyzYBpmKedJhwcHac1YToZItMXrGnSGuxjYCSzafOwRInGphmoueA7A/zmNOlQKEz72X5ipn7JFjPv7zZDM3zyDzTc7e86l1ioGQgEAiaiWtLJfGUsTFtwuokswyNK2hC0Hd7yPGCI+gKYTKeDobEw7cGLxEyTmGnSHryYNXjgbg58aVWhfV8DXG67PLHmLe9ykNp0eglPTBKemGRwZJzB0bTesHY6cLzJ+mCf/Ew8597HVvuunfqvh+i/Yf1WzlAjhmF+kqwyqYGezT1/KlEfZZMkEwl8cLzheNKvg5QXW93+Y+0CX2Ufy6FE7bO77LW9mZsbde9BSWf2qJxJ4Gj1BZ/tDPjPX+7ajgDAkZ1H/hoN5W0VODRzvNRScGBkLL/eCTz8D35wOBqBh3Wiseuwcke93DeR8urboSKI2pcDJenCw5P6ky9RKX6zLn4QcvtR/Wad1ayedP0NIsr0804VIhkAAAAASUVORK5CYII=</ImageData></EmbeddedImage></EmbeddedImages><Language>en-US</Language><CodeModules><CodeModule>Microsoft.EnterpriseManagement.Reporting.Code, Version=6.0.0.0, Culture=neutral</CodeModule></CodeModules><ConsumeContainerWhitespace>true</ConsumeContainerWhitespace><rd:ReportUnitType>Inch</rd:ReportUnitType><rd:ReportServerUrl>http://localhost/ReportServer_INSTANCE02</rd:ReportServerUrl><rd:ReportID>ab518a51-343d-46c4-b1f8-4ec65faafd95</rd:ReportID></Report>