private bool FindColumn( InstanceReportColumn col, ColumnRowRequirement netCell ) { if( netCell.Period != null ) { CalendarPeriod colCalendar = col.GetCalendarPeriod(); if( netCell.Period.PeriodType == colCalendar.PeriodType ) { if( !CalendarPeriod.Equals( colCalendar, netCell.Period ) ) return false; } else { CalendarPeriod cpDuration = null; CalendarPeriod cpInstant = null; if( colCalendar.PeriodType == Element.PeriodType.instant ) { cpDuration = netCell.Period; cpInstant = colCalendar; } else { cpDuration = colCalendar; cpInstant = netCell.Period; } if( netCell.ElementRow != null && netCell.ElementRow.IsBeginningBalance ) { if( !DateTime.Equals( cpInstant.StartDate.AddDays(1), cpDuration.StartDate ) ) return false; } else { if( !DateTime.Equals( cpInstant.StartDate, cpDuration.EndDate ) ) return false; } } } if( netCell.Unit != null ) { string colCC = GetColumnCurrencyCode( col ); string unitCC = netCell.UnitCode; bool unitsMatch = colCC == unitCC; if( !unitsMatch ) return false; } if( netCell.Segments != null ) { foreach( Segment seg in netCell.Segments ) { bool found = false; foreach( Segment cSeg in col.Segments ) { if( cSeg.DimensionInfo.dimensionId == seg.DimensionInfo.dimensionId ) { if( cSeg.DimensionInfo.Id == seg.DimensionInfo.Id ) { found = true; break; } else { return false; } } } if( !found && !seg.IsDefaultForEntity ) return false; } } return true; }
public void ApplyBalanceDateLabel( InstanceReportColumn calendarColumn, string dateFormat ) { CalendarPeriod cp = calendarColumn.GetCalendarPeriod(); this.ApplyBalanceDateLabel( cp, dateFormat ); }
public void ApplyBalanceDateLabel(InstanceReportColumn calendarColumn, string dateFormat) { CalendarPeriod cp = calendarColumn.GetCalendarPeriod(); this.ApplyBalanceDateLabel(cp, dateFormat); }
public void ApplyBalanceDateLabel( InstanceReportColumn calendarColumn ) { CalendarPeriod cp = calendarColumn.GetCalendarPeriod(); this.ApplyBalanceDateLabel( cp ); }
public void ApplyBalanceDateLabel(InstanceReportColumn calendarColumn) { CalendarPeriod cp = calendarColumn.GetCalendarPeriod(); this.ApplyBalanceDateLabel(cp); }