private void ProcessMissingMapsMultiCurrency( List<ColumnInstantDurationMap> columnMaps )
        {
            if( !this.ContainMultiCurrencies() )
                return;

            for( int durIndex = 0; durIndex < this.Columns.Count; durIndex++ )
            {
                InstanceReportColumn ircDuration = this.Columns[ durIndex ];
                if( ircDuration.MyPeriodType != Element.PeriodType.duration )
                    continue;

                if( !string.Equals( ircDuration.CurrencyCode, InstanceUtils.USDCurrencyCode, StringComparison.CurrentCultureIgnoreCase ) )
                    continue;

                for( int instantIndex = 0; instantIndex < this.Columns.Count; instantIndex++ )
                {
                    InstanceReportColumn ircInstant = this.Columns[ instantIndex ];
                    if( ( ircInstant.CurrencyCode.ToLower() == "usd" || String.IsNullOrEmpty( ircInstant.CurrencyCode ) ) &&
                        ircInstant.MyPeriodType == Element.PeriodType.instant &&
                        ircInstant.MyContextProperty.PeriodStartDate == ircDuration.MyContextProperty.PeriodEndDate )
                    {
                        if( ircDuration.SegmentAndScenarioEquals( ircInstant ) )
                        {
                            bool found = false;
                            ColumnInstantDurationMap newMap = new ColumnInstantDurationMap( instantIndex, durIndex, ircDuration.ReportingSpan );
                            foreach( ColumnInstantDurationMap map in columnMaps )
                            {
                                if( map.DurationColumnIndex == durIndex && map.InstantColumnIndex == instantIndex )
                                {
                                    found = true;
                                    break;
                                }
                            }

                            if( !found )
                                columnMaps.Add( newMap );
                        }
                    }
                }
            }
        }
        public void ProcessMergeInstanceDuration_Rule( List<ColumnInstantDurationMap> ColumnMaps )
        {
            //columnMaps = new List<ColumnInstantDurationMap>();

            if( this.IsUncatReport )
            {
                this.MergeColumnsWithSameContext();
            }
            else
            {
                List<InstanceReportColumn> instanceColumns = this.Columns.FindAll( c => c.MyPeriodType == Element.PeriodType.instant );
                List<InstanceReportColumn> durationColumns = this.Columns.FindAll( c => c.MyPeriodType == Element.PeriodType.duration );

                foreach( InstanceReportColumn instCol in instanceColumns )
                {
                    int ic = this.Columns.IndexOf( instCol );

                    List<InstanceReportColumn> durCols = durationColumns.FindAll( dc => ColumnsShouldBeMerged( dc, instCol ) );
                    foreach( InstanceReportColumn durCol in durCols )
                    {
                        int dc = this.Columns.IndexOf( durCol );

                        TimeSpan timeBucketSize = durCol.MyContextProperty.PeriodEndDate - durCol.MyContextProperty.PeriodStartDate;
                        ColumnInstantDurationMap instanceColMap = new ColumnInstantDurationMap( ic, dc, timeBucketSize );
                        ColumnMaps.Add( instanceColMap );
                    }
                }
            }

            this.SynchronizeGrid();
        }