Exemple #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;
                 }
             }
         }
     }
 }
Exemple #2
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;
                    }
                }
            }
        }