Пример #1
0
 private void ProcessGroups(Graphics g)
 {
     this.canPrinDetalhe = true;
     for (int i = 0; i < base.Bandgroupcolletion.Count; i++)
     {
         BandGroup group = (BandGroup)base.Bandgroupcolletion[i];
         if ((this.dataSource.GetFieldValue(group.FieldName) != null) && (group.CurrentValue != this.dataSource.GetFieldValue(group.FieldName).ToString()))
         {
             if (group.IsStarted)
             {
                 this.dataSource.DataSourcePriorRecord();
                 this.ProcessGroupFooter(group, g);
                 this.dataSource.DataSourceNextRecord();
             }
             if (this.canPrinDetalhe)
             {
                 group.Start();
                 group.CurrentValue = this.dataSource.GetFieldValue(group.FieldName).ToString();
                 if (!this.PrintBand(group.BandHeader, g))
                 {
                     group.Reset();
                     this.canPrinDetalhe = false;
                 }
                 else
                 {
                     this.canPrinDetalhe = true;
                 }
             }
         }
     }
 }
Пример #2
0
        private void ProcessBandGroup(XmlElement xElementBand)
        {
            XmlAttribute attribute = xElementBand.Attributes["Type"];
            BandGroup    band      = null;

            band = new BandGroup {
                FieldName = xElementBand.Attributes["FieldName"].Value
            };
            BandBase bandHeader = null;

            foreach (XmlElement element in xElementBand.ChildNodes)
            {
                if (element.Name.Equals("BandGroupHeader"))
                {
                    bandHeader = band.BandHeader;
                }
                if (element.Name.Equals("BandGroupFooder"))
                {
                    bandHeader = band.BandFooder;
                }
                bandHeader.Top    = this.GetInteger(element.Attributes, "Top");
                bandHeader.Height = this.GetInteger(element.Attributes, "Height");
                foreach (XmlElement element2 in element.ChildNodes)
                {
                    this.ProcessControls(element2, bandHeader);
                }
            }
            this.report.AddBand(band);
        }
Пример #3
0
 private void ProcessGrupsCalc()
 {
     for (int i = 0; i < base.Bandgroupcolletion.Count; i++)
     {
         BandGroup group = (BandGroup)base.Bandgroupcolletion[i];
         if ((this.dataSource.GetFieldValue(group.FieldName) != null) && (group.CurrentValue == this.dataSource.GetFieldValue(group.FieldName).ToString()))
         {
             group.Calc();
         }
     }
 }
Пример #4
0
        private void MakeXmlBandGroup(XmlElement xElementRoot, BandGroup band)
        {
            this.AddAtributo(xElementRoot, "Type", band.BandType.ToString());
            this.AddAtributo(xElementRoot, "Name", band.Name);
            this.AddAtributo(xElementRoot, "Top", band.Top.ToString());
            this.AddAtributo(xElementRoot, "FieldName", band.FieldName);
            XmlElement element = this.AddElement(xElementRoot, "BandGroupHeader");

            this.MakeXmlBandSettings(element, band.BandHeader);
            element = this.AddElement(xElementRoot, "BandGroupFooder");
            this.MakeXmlBandSettings(element, band.BandFooder);
        }
Пример #5
0
 private void BtnOk_Click(object sender, EventArgs e)
 {
     foreach (string str in this.listGroups.Items)
     {
         if (!this.HasReportGroup(str))
         {
             BandGroup band = new BandGroup {
                 FieldName = str
             };
             this.currentReport.AddBand(band);
         }
     }
     base.Close();
 }
Пример #6
0
        private void ProcessGroupFooter(BandGroup group, Graphics g)
        {
            int index = base.BandsGroup.IndexOf(group);

            for (int i = base.BandsGroup.Count - 1; i >= index; i--)
            {
                BandGroup group2 = (BandGroup)base.BandsGroup[i];
                if (group2.IsStarted)
                {
                    if (this.PrintBand(group2.BandFooder, g))
                    {
                        group2.Reset();
                        this.canPrinDetalhe = true;
                    }
                    else
                    {
                        this.canPrinDetalhe = false;
                    }
                }
            }
        }
Пример #7
0
        private void button3_Click(object sender, EventArgs e)
        {
            //if (this.HasReportGroup(this.listGroups.SelectedItem.ToString()))
            //{
            //    this.currentReport.Bands.RemoveAt(group.BandHeader.Index);
            //    this.currentReport.Bands.RemoveAt(group.BandFooder.Index);

            //    this.currentReport.BandsGroup.RemoveAt(group.Index);
            //}
            BandGroup bg = null;

            foreach (BandGroup group in this.currentReport.BandsGroup)
            {
                if (group.FieldName == this.listGroups.SelectedItem.ToString())
                {
                    bg = group;
                }
            }
            if (null != bg)
            {
                parent.RemoveBand(bg);
            }
            this.listGroups.Items.RemoveAt(this.listGroups.SelectedIndex);
        }