Ejemplo n.º 1
0
        protected override Section AddALoacleSection(XmlElement xec)
        {
            Section section = null;
            string  type    = xec.GetAttribute("Type");

            switch (type.ToLower())
            {
            case "pageheader":
                section = new PageHeader();
                AddOtherControl(xec, section);
                break;

            case "pagefooter":
                section = new PageFooter();
                AddOtherControl(xec, section);
                break;

            case "indicatordetail":
                section = new IndicatorDetail();
                AddControl(xec, section);
                break;

            case "reportheader":
                section = new ReportHeader();
                AddControl(xec, section);
                break;
            }
            if (section != null)
            {
                ConvertFromLocaleInfo(xec, section);
                _report.Sections.Add(section);
            }
            return(section);
        }
        public IndicatorDetailBuilder(string viewid, IndicatorDetail indicatordetail, Detail detail, SemiRowsContainer semirowscontainer)
        {
            _viewid = viewid;
            indicatordetail.AsignToSectionLines();
            _currentcells = indicatordetail.Cells;
            _currentlines = indicatordetail.SectionLines;

            _detail            = detail;
            _detail.UnderState = ReportStates.Browse;
            _semirowscontainer = semirowscontainer;
            _rows = new Rows();

            for (int i = 0; i < _currentlines.Count; i++)
            {
                _newline = new SectionLine(_detail);
                _detail.SectionLines.Add(_newline);
            }

            _data = new DataSet();
        }
Ejemplo n.º 3
0
 protected virtual IndicatorBuilder CreateIndicatorDetailBuilder(string viewid, IndicatorDetail idetail, Detail detail, SemiRowsContainer semirowcontainer)
 {
     return(new IndicatorDetailBuilder(viewid, idetail, detail, _semirowscontainer));
 }
Ejemplo n.º 4
0
        protected override void _semirowscontainer_ReportComing(Report report)
        {
            if (_detailbuilder == null)
            {
                IndicatorDetail indicatordetail = (IndicatorDetail)report.Sections[SectionType.IndicatorDetail];
                if (_context.MatrixOrChart == MatrixOrChart.None)
                {
                    if (indicatordetail.Cells.Count == 2)
                    {
                        Cell cell1 = indicatordetail.Cells[0];
                        Cell cell2 = indicatordetail.Cells[1];
                        if ((cell1.Visible && !cell2.Visible) || (!cell1.Visible && cell2.Visible))
                        {
                            if (cell1 is IndicatorMetrix && cell2 is Chart)
                            {
                                if (cell1.Visible)
                                {
                                    _context.MatrixOrChart = MatrixOrChart.Matrix;
                                    indicatordetail.Cells.Remove(cell2);
                                }
                                else
                                {
                                    _context.MatrixOrChart = MatrixOrChart.Chart;
                                }
                            }
                            else if (cell1 is Chart && cell2 is IndicatorMetrix)
                            {
                                if (cell1.Visible)
                                {
                                    _context.MatrixOrChart = MatrixOrChart.Chart;
                                }
                                else
                                {
                                    _context.MatrixOrChart = MatrixOrChart.Matrix;
                                    indicatordetail.Cells.Remove(cell1);
                                }
                            }
                        }
                    }
                }
                else if (_context.MatrixOrChart == MatrixOrChart.Chart)
                {
                    Cell cell1 = indicatordetail.Cells[0];
                    Cell cell2 = indicatordetail.Cells[1];
                    if (cell1 is IndicatorMetrix)
                    {
                        cell1.Visible = false;
                        cell2.Visible = true;
                    }
                    else
                    {
                        cell1.Visible = true;
                        cell2.Visible = false;
                    }
                }
                else//MatrixOrChart.Matrix
                {
                    Cell cell1 = indicatordetail.Cells[0];
                    Cell cell2 = indicatordetail.Cells[1];
                    if (cell1 is IndicatorMetrix)
                    {
                        cell1.Visible = true;
                        indicatordetail.Cells.Remove(cell2);
                    }
                    else
                    {
                        cell2.Visible = true;
                        indicatordetail.Cells.Remove(cell1);
                    }
                }

                //if (indicatordetail.Cells.Count == 1 && indicatordetail.Cells[0] is IndicatorMetrix)
                //{
                //    _detailbuilder = CreateIndicatorBuilder(report.ViewID, indicatordetail.Cells[0] as IndicatorMetrix, _semirowscontainer4matrix);
                //}
                //else
                //{
                Detail detail = new Detail();
                report.Sections.Remove(indicatordetail);
                report.Sections.Add(detail);
                _detailbuilder = CreateIndicatorDetailBuilder(report.ViewID, indicatordetail, detail, _semirowscontainer);
                _context.FillFrom(report);
                //}
            }
            else
            {
                OnBindingMatrixStyle(report);

                //if (_semirowscontainer4matrix.b4Matrix )
                //{
                //    report.Type = ReportType.MetrixReport;
                //    report.FreeViewStyle = FreeViewStyle.MergeCell;
                //    _context.FillFrom(report);
                //    _context.ViewID = _detailbuilder.ViewID;
                //    report.SetVisibleWidth(report.Sections[SectionType.PageTitle].VisibleWidth);
                //    //_detailbuilder.BuildIndicatorMetrix(report, false);
                //}
                _context.Report.BaseTable = report.BaseTable;

                bool hasdrilldefined = OnDrillDefined(_context.ViewID, report.ViewID);
                _detailbuilder.BuildIndicatorMetrix(report, hasdrilldefined);
            }
        }
Ejemplo n.º 5
0
 public IndicatorDetail(IndicatorDetail detail) : base(detail)
 {
 }