public override void BuildIndicatorMetrix(Report report, bool hasdrilldefined)
        {
            BuildTheLastMetrix();

            _currentmetrix = _currentcells[report.ViewID] as IMetrix;
            _currentreport = report;
            Section pagetitle = report.Sections[SectionType.PageTitle];

            if (bChartDataSource)
            {
                CreateDataTable(pagetitle);
            }
            if (hasdrilldefined)
            {
                if ((_currentmetrix as Cell).Visible || _currenttable != null)
                {
                    CreateNameToColumnMap();
                    if (_currenttable != null)
                    {
                        _chartdrilldata = new DrillData(_viewid, report.ViewID);
                    }
                }
            }

            if ((_currentmetrix as Cell).Visible)
            {
                int index = FindTheLine(_currentmetrix as Cell);
                _currentline = _currentlines[index];

                _currentx = (_currentmetrix as Cell).X + bRightAMetrix(_currentmetrix as Cell, _currentline);
                _currenty = (_currentmetrix as Cell).Y + bUnderAMetrix(_currentmetrix as Cell, _currentline);
                _beginy   = _currenty;

                _newline = _detail.SectionLines[index];

                foreach (Section section in report.Sections)
                {
                    section.AsignToSectionLines();
                    //if (section is GroupHeader)
                    //{
                    //    foreach (Cell cell in section.Cells)
                    //        cell.Border.AllBorder();
                    //}
                }

                _rows.AppendFrom(pagetitle);
            }
        }
Exemplo n.º 2
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (edSvc == null)
            {
                return(value);
            }
            IndicatorDesign id        = new IndicatorDesign();
            IIndicator      indicator = context.Instance as IIndicator;

            if (indicator is CalculatorIndicator)
            {
                if (indicator.SummaryCompare == null)
                {
                    indicator.SummaryCompare = new CompareValue();
                }
            }
            else
            {
                IMetrix metrix = (indicator as IPart).Metrix;
                if (metrix != null && (metrix as IIndicatorMetrix).CrossPart != null)
                {
                    if (indicator.TotalCompare == null)
                    {
                        indicator.TotalCompare = new CompareValue();
                    }
                }
                else
                {
                    indicator.TotalCompare = null;
                }
                if (indicator.DetailCompare == null)
                {
                    indicator.DetailCompare = new CompareValue();
                }
                if (indicator.SummaryCompare == null)
                {
                    indicator.SummaryCompare = new CompareValue();
                }
            }
            id.Init((Cell)indicator, indicator.DetailCompare, indicator.SummaryCompare, indicator.TotalCompare);
            edSvc.ShowDialog(id);
            return(value);
        }