예제 #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);
        }
예제 #2
0
        private void AddControl(XmlElement xec, Section section)
        {
            Section header = null;

            foreach (XmlElement xecc in xec.ChildNodes)//control
            {
                string type = xecc.GetAttribute("Type").ToLower();
                Cell   cell = IndicatorControl(type);
                if (cell == null)
                {
                    continue;
                }
                ConvertFromLocaleInfo(xecc, cell);
                if (section.SectionType != SectionType.ReportHeader && (type == "commonlabel" || type == "expression" || type == "dbtext"))
                {
                    header = _report.Sections[SectionType.ReportHeader];
                    if (header == null)
                    {
                        header        = new ReportHeader();
                        header.Height = 140;
                        _report.Sections.Add(header);
                    }
                    header.Cells.Add(cell);
                }
                else
                {
                    section.Cells.Add(cell);
                }
            }
        }
예제 #3
0
        protected override Section AddALoacleSection(XmlElement xec)
        {
            Section section = null;
            string  type    = xec.GetAttribute("Type");

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

            case "printpagesummary":
                section = new PrintPageSummary();
                AddOtherControl(xec, section);
                break;

            case "pageheader":
                section = new PageHeader();
                AddOtherControl(xec, section);
                break;

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

            case "reportheader":
                section = new ReportHeader();
                AddHeaderControl(xec, section);
                break;

            case "crossdetail":
                section = new CrossDetail();
                AddDetailControl(xec, section);
                break;

            case "crossrowheader":
                section = new CrossRowHeader();
                AddRowControl(xec, section);
                break;

            case "crosscolumnheader":
                section = new CrossColumnHeader();
                AddColumnControl(xec, section);
                break;
            }
            if (section != null)
            {
                ConvertFromLocaleInfo(xec, section);
                //section.Name = "";
                _report.Sections.Add(section);
            }
            return(section);
        }
예제 #4
0
        protected override void AddDefaultDetail()
        {
            ReportHeader rh = new ReportHeader();
            Cell         h  = new CommonLabel(100, 40, 280, 80, HeaderLabel);

            h.Name = "HeaderLabel";
            (h as ICenterAlign).CenterAlign = true;
            h.CaptionAlign        = System.Drawing.ContentAlignment.MiddleCenter;
            h.ServerFont.FontSize = 20;
            h.ServerFont.FontName = "ºÚÌå";
            rh.Cells.Add(h);
            _report.Sections.Add(rh);

            GridDetail gd   = new GridDetail();
            int        left = 8;

            System.Collections.ICollection keys = _report.DataSources.DesignKeys;
            if (keys == null)
            {
                keys = _report.DataSources.Keys;
            }
            foreach (string key in keys)
            {
                DataSource ds   = _report.DataSources[key];
                Cell       cell = gd.GetDefaultRect(ds);
                if (cell != null)
                {
                    cell.X = left;
                    left  += cell.Width;
                    if (_datahelper.bCusName(ds.Name))
                    {
                        cell.Visible = false;
                    }
                    cell.SetY(DefaultConfigs.SECTIONHEADERHEIGHT + 8);
                    gd.Cells.Add(cell);
                }
            }
            if (gd.Cells.Count > 0)
            {
                (gd as IAutoDesign).AutoDesign(DefaultConfigs.ReportLeft);
                _report.DesignWidth = gd.Width + 300;
            }
            _report.Sections.Add(gd);
        }
예제 #5
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 "pagetitle":
                section = new PageTitle();
                AddCalculateControl(xec, section);
                break;

            case "printpagetitle":
                section = new PrintPageTitle();
                AddOtherControl(xec, section);
                break;

            case "printpagesummary":
                section = new PrintPageSummary();
                AddOtherControl(xec, section);
                break;

            case "reportheader":
                section = new ReportHeader();
                AddHeaderControl(xec, section);
                break;

            case "reportsummary":
                section = new ReportSummary();
                AddCalculateControl(xec, section);
                (section as ReportSummary).InitVisibleWidth();
                break;

            case "groupheader":
                section = new GroupHeader();
                AddGroupControl(xec, section);
                break;

            case "groupsummary":
                section = new GroupSummary();
                AddGroupSummaryControl(xec, section);
                break;

            case "detail":
                section = new Detail();
                AddNormalControl(xec, section);
                break;
            }
            if (section != null)
            {
                ConvertFromLocaleInfo(xec, section);
                //section.Name = "";
                _report.Sections.Add(section);
            }
            return(section);
        }
예제 #6
0
 public ReportHeader(ReportHeader reportheader) : base(reportheader)
 {
     _bautosequence = reportheader.bAutoSequence;
 }
예제 #7
0
        protected override Section AddALoacleSection(XmlElement xec)
        {
            Section section = null;
            string  type    = xec.GetAttribute("Type");

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

            case "printpagesummary":
                section = new PrintPageSummary();
                AddOtherControl(xec, section);
                break;

            case "pageheader":
                section = new PageHeader();
                AddOtherControl(xec, section);
                break;

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

            case "reportheader":
                section = new ReportHeader();
                AddHeaderControl(xec, section);
                break;

            case "reportsummary":
                bool baddwhendesign = false;
                if (xec.HasAttribute("bAddWhenDesign"))
                {
                    baddwhendesign = bool.Parse(xec.GetAttribute("bAddWhenDesign"));
                }
                if (!baddwhendesign)
                {
                    section = new PageFooter();
                    AddOtherControl(xec, section);
                }
                else
                {
                    section = new ReportSummary();
                    AddOtherControl(xec, section);
                    (section as ReportSummary).InitVisibleWidth();
                }
                section.Name = "";
                break;

            case "griddetail":
                section = new GridDetail();
                AddDetailControl(xec, section);
                break;
            }
            if (section != null)
            {
                ConvertFromLocaleInfo(xec, section);
                _report.Sections.Add(section);
                //section.Name = type;
            }
            return(section);
        }