Пример #1
0
        private int RenderSubTotalHeader(Rdl.Render.Container box, Rdl.Runtime.Context context, bool hidden, TextBox tb, int column)
        {
            Rdl.Render.FixedContainer cell = null;

            if (box != null && !hidden)
            {
                cell      = box.AddFixedContainer(this, Style, context);
                cell.Name = "SubtotalColumnHeader";
                //cell.Height = TotalHeight;
                cell.Width             = FindMatrix(this).ColumnWidth;
                cell.MatchParentHeight = true;
                //cell.CanGrowVertically = false;

                if (tb != null)
                {
                    tb.LinkedToggles.Add(new Toggle(cell, tb, Enums.ToggleDirectionEnum.negative));
                }
            }

            if (_subtotal != null)
            {
                _subtotal.ReportItems.Render(cell, context);
            }
            return(column + 1);
        }
Пример #2
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            Rdl.Render.FlowContainer rowBox = null;
            if (box != null)
            {
                rowBox                  = box.AddFlowContainer(this, Style, context, Rdl.Render.FlowContainer.FlowDirectionEnum.LeftToRight);
                rowBox.Name             = "RowBox";
                rowBox.MatchParentWidth = true;
                rowBox.Height           = Height.points;
            }

            int index = 0;

            foreach (Cell tc in _matrixCells)
            {
                Rdl.Render.FixedContainer cell = null;

                Matrix matrix = FindMatrix(this);

                if (rowBox != null)
                {
                    cell                    = rowBox.AddFixedContainer(this, Style, context);
                    cell.Name               = "MatrixCell";
                    cell.Height             = _height.points;
                    cell.Width              = matrix.Columns[index].Width;
                    cell.MatchParentHeight  = true;
                    cell.CanGrowHorizonally = false;
                }

                tc.Render(cell, context);

                index++;
            }
        }
Пример #3
0
        private int RenderSubtotal(Rdl.Render.Container box, Rdl.Runtime.Context context, bool hidden, TextBox tb, int column)
        {
            Rdl.Render.FixedContainer cell = null;

            if (!hidden && box != null)
            {
                cell      = box.AddFixedContainer(this, Style, context);
                cell.Name = "DynamicColumnSubtotal";
                //cell.Width = FindMatrix(this).ColumnWidth;
                cell.Height            = Height.points;
                cell.MatchParentHeight = true;
                if (tb != null)
                {
                    tb.LinkedToggles.Add(new Toggle(cell, tb, Enums.ToggleDirectionEnum.negative));
                }

                // Render the details.
                MatrixElement m = RenderNext;
                while (m is ColumnGrouping)
                {
                    m = ((ColumnGrouping)m).RenderNext;
                }

                m.Render(cell, context);
            }
            return(column + 1);
        }
Пример #4
0
        public void Render(Rdl.Render.Container box, Rdl.Runtime.Context context, ref decimal cellPos)
        {
            Table table = FindTable(this);

            Rdl.Render.FixedContainer cellBox = null;

            bool visible = true;

            if (table.TableColumns[_colIndex].Visibility != null && table.TableColumns[_colIndex].Visibility.IsHidden(context) && table.TableColumns[_colIndex].Visibility.ToggleItem == null)
            {
                visible = false;
            }
            if (box != null && visible)
            {
                cellBox      = box.AddFixedContainer(this, Style, context);
                cellBox.Name = "TableCell";
                cellBox.Left = cellPos;
                for (int i = 0; i < _colSpan; i++)
                {
                    cellBox.Width += table.TableColumns[_colIndex + i].Width.points;
                }
                cellBox.Height            = box.Height;
                cellBox.MatchParentHeight = true;

                cellPos += cellBox.Width;
            }

            if (_reportItems != null)
            {
                _reportItems.Render(cellBox, context);
            }
        }
Пример #5
0
        protected override void Render1(Rdl.Render.Container parentBox, Rdl.Runtime.Context context, bool visible)
        {
            DataSet ds = null;

            if (_dataSetName != null)
            {
                ds = Report.DataSets[_dataSetName];
            }
            else if (context.DataSet != null)
            {
                ds = context.DataSet;
            }
            else if (Report.DataSets.Count == 1)
            {
                ds = Report.DataSets.FirstDataSet;
            }
            else
            {
                throw new Exception("Missing data set name in dataregion " + this.Name);
            }

            if (ds == null)
            {
                throw new Exception("Invalid dataSetName " + _dataSetName + " in DataRegion " + _name);
            }

            _context = new Rdl.Runtime.Context(
                context.FindContextByDS(ds),
                ds,
                _filters,
                null,
                null);
            _context.ReportItemName = Name;
            parentBox.ContextBase   = true;
        }
Пример #6
0
 protected override void Render1(Rdl.Render.Container parentBox, Rdl.Runtime.Context context, bool visible)
 {
     if (visible)
     {
         _box = parentBox.AddFixedContainer(this, Style, context);
     }
 }
Пример #7
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            Rdl.Render.FixedContainer bodyBox = null;

            if (box == null)
            {
                bodyBox = new Rdl.Render.FixedContainer(null, this, new Rdl.Render.BoxStyle(Style, context));
            }
            else
            {
                bodyBox = box.AddFixedContainer(this, Style, context);
            }

            bodyBox.Name          = "Body";
            bodyBox.Columns       = _columns;
            bodyBox.ColumnSpacing = _columnSpacing.points;
            bodyBox.Height        = _height.points;
            bodyBox.Width         = box.Width;

            if (_columns > 1)
            {
                bodyBox.Width = (bodyBox.Width / _columns) -
                                (_columnSpacing.points * (_columns - 1));
            }

            _reportItems.Render(bodyBox, context);
        }
Пример #8
0
        internal override int RenderHeader(Rdl.Render.Container box, Rdl.Runtime.Context context, int column)
        {
            for (int i = 0; i < _staticColumns.Count; i++)
            {
                ReportItems item = _staticColumns[i];
                Rdl.Render.FixedContainer contentBox = null;

                if (box != null)
                {
                    contentBox                   = box.AddFixedContainer(this, Style, context);
                    contentBox.Name              = "StaticColumnContent";
                    contentBox.Height            = Height.points;
                    contentBox.MatchParentHeight = true;
                    contentBox.Width             = FindMatrix(this).Columns[i].Width;
                    contentBox.CanGrowVertically = false;
                }

                item.Render(contentBox, context);
            }

            if (RenderNext != null && RenderNext is RowGrouping)
            {
                column = ((ColumnGrouping)RenderNext).RenderHeader(box, context, column);
            }
            else if (RenderNext != null)
            {
                column++;
            }

            return(column);
        }
Пример #9
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            Rdl.Render.FixedContainer rowBox = null;
            bool    visible = true;
            TextBox tb      = FindToggleItem(_visibility);

            if (_visibility != null && _visibility.IsHidden(context) && _visibility.ToggleItem == null)
            {
                visible = false;
            }
            if (box != null && visible)
            {
                rowBox        = box.AddFixedContainer(this, Style, context);
                rowBox.Name   = "TableRow";
                rowBox.Width  = box.Width;
                rowBox.Height = _height.points;

                if (tb != null)
                {
                    tb.LinkedToggles.Add(new Toggle(rowBox, tb));
                }
            }
            decimal cellPos = 0;

            foreach (Cell tc in _tableCells)
            {
                tc.Render(rowBox, context, ref cellPos);
            }
        }
Пример #10
0
 internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
 {
     if (_reportItems != null)
     {
         _reportItems.Render(box, context);
     }
 }
Пример #11
0
 internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
 {
     foreach (Row row in _tableRows)
     {
         row.Render(box, context);
     }
 }
Пример #12
0
 protected override void Render1(Rdl.Render.Container parentBox, Rdl.Runtime.Context context, bool visible)
 {
     if (visible && parentBox != null)
     {
         _box      = parentBox.AddImageElement(this, Style, context);
         _box.Name = "Image";
     }
 }
Пример #13
0
 protected override void Render1(Rdl.Render.Container parentBox, Rdl.Runtime.Context context, bool visible)
 {
     base.Render1(parentBox, context, visible);
     if (visible)
     {
         _box      = parentBox.AddFlowContainer(this, Style, _context, Rdl.Render.FlowContainer.FlowDirectionEnum.TopDown);
         _box.Name = _name;
     }
 }
Пример #14
0
 protected override void Render1(Rdl.Render.Container parentBox, Rdl.Runtime.Context context, bool visible)
 {
     base.Render1(parentBox, context, visible);
     if (visible)
     {
         _box              = parentBox.AddChartElement(this, Style, _context);
         _box.Name         = _name;
         _box.KeepTogether = true;
     }
 }
Пример #15
0
 protected override void Render1(Rdl.Render.Container box, Rdl.Runtime.Context context, bool visible)
 {
     if (visible)
     {
         _box = box.AddFixedContainer(this, Style, context);
         _box.PageBreakBefore = _pageBreakAtStart;
         _box.PageBreakAfter  = _pageBreakAtEnd;
         _box.KeepTogether    = true;
         _box.Name            = "Rectangle";
     }
 }
Пример #16
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            if (box != null)
            {
                box.Fixed = _fixedHeader;
            }

            foreach (Row row in _tableRows)
            {
                row.Render(box, context);
            }
        }
Пример #17
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            Rdl.Render.FixedContainer headerBox = box.AddFixedContainer(this, Style, context);
            headerBox.Name             = "Page" + _headerFooter.ToString();
            headerBox.Height           = _height.points;
            headerBox.MatchParentWidth = true;

            if (_reportItems != null)
            {
                _reportItems.Render(headerBox, context);
            }
        }
Пример #18
0
        protected override void Render2(Rdl.Runtime.Context context)
        {
            base.Render2(context);
            if (_box != null)
            {
                Rdl.Render.FlowContainer matrixBox = _box as Rdl.Render.FlowContainer;

                // Create the column header row
                Rdl.Render.FlowContainer headerRow = matrixBox.AddFlowContainer(this, Style, _context, Rdl.Render.FlowContainer.FlowDirectionEnum.LeftToRight);
                headerRow.Name        = "RowHeaders";
                headerRow.ContextBase = true;

                // Create the corner
                Rdl.Render.Container corner = headerRow.AddFixedContainer(this, Style, _context);
                corner.Name = "Corner";
                if (_rowGroupings.Count > 0)
                {
                    corner.Width = _rowGroupings[0].TotalWidth;
                }
                corner.CanGrowHorizonally = false;
                //corner.CanGrowVertically = false;
                corner.MatchParentHeight = true;
                _corner.Render(corner, _context);

                // Render the column headers
                if (_columnGroupings.Count > 0)
                {
                    _columnGroupings[0].RenderHeader(headerRow, _context, 0);
                }

                // The groups are linked together into a list, so we need only call
                // render on the first entry in the list.
                if (_rowGroupings.Count > 0)
                {
                    _rowGroupings[0].Render(matrixBox, _context);
                }
                else if (_columnGroupings.Count > 0)
                {
                    _columnGroupings[0].Render(matrixBox, _context, null, 0);
                }
                else
                {
                    _matrixRows.Render(matrixBox, _context);
                }

                matrixBox.Parent.Height = Math.Max(matrixBox.Parent.Height, matrixBox.Top + matrixBox.Height);
                matrixBox.Parent.Width  = Math.Max(matrixBox.Parent.Width, matrixBox.Left + matrixBox.Width);
            }
        }
Пример #19
0
        public void LinkToggles()
        {
            foreach (Rdl.Engine.TextBox tb in TextBoxes.Values)
            {
                foreach (Rdl.Engine.Toggle tog in tb.LinkedToggles)
                {
                    Rdl.Render.Container c = (Rdl.Render.Container)tog.Element;

                    c.Toggles.AddToggle(tb.TextElement, tog.Direction);
                    tb.TextElement.LinkedToggles.Add(c);
                    tb.TextElement.IsToggle = true;
                }
                tb.LinkedToggles.Clear();
            }
        }
Пример #20
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            Rdl.Render.FlowContainer rowsBox = null;
            if (box != null)
            {
                rowsBox      = box.AddFlowContainer(this, Style, context, Rdl.Render.FlowContainer.FlowDirectionEnum.TopDown);
                rowsBox.Name = "RowsBox";
                rowsBox.MatchParentHeight = true;
                rowsBox.MatchParentWidth  = true;
            }

            foreach (Row r in _rows)
            {
                r.Render(rowsBox, context);
            }
        }
Пример #21
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            if (_staticRows.Count > FindMatrix(this).Rows.Count)
            {
                throw new Exception("There are more static row elements defined in matrix " + FindMatrix(this).Name + " than there are data rows.");
            }

            Rdl.Render.FlowContainer contentBox = null;
            if (box != null)
            {
                contentBox                   = box.AddFlowContainer(this, Style, context, Rdl.Render.FlowContainer.FlowDirectionEnum.TopDown);
                contentBox.Name              = "StaticRowContent";
                contentBox.Width             = Width.points;
                contentBox.MatchParentWidth  = true;
                contentBox.CanGrowVertically = true;
            }

            for (int i = 0; i < _staticRows.Count; i++)
            {
                Rdl.Render.FixedContainer cellBox = null;
                if (contentBox != null)
                {
                    cellBox                  = contentBox.AddFixedContainer(this, Style, context);
                    cellBox.Name             = "StaticRowCell";
                    cellBox.Height           = FindMatrix(this).Rows[i].Height.points;
                    cellBox.MatchParentWidth = true;
                }

                ReportItems item = _staticRows[i];

                item.Render(cellBox, context);
            }

            if (RenderNext != null)
            {
                if (RenderNext is ColumnGrouping)
                {
                    ((ColumnGrouping)RenderNext).Render(box, FindMatrix(this).Context, context, 0);
                }
                else
                {
                    RenderNext.Render(box, context);
                }
            }
        }
Пример #22
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            foreach (ReportItem ri in _reportItems)
            {
                ri.Render(box, context);
            }

            foreach (ReportItem ri in _reportItems)
            {
                if (ri.RepeatWith != null)
                {
                    foreach (ReportItem ri2 in _reportItems)
                    {
                        if (ri2.Name == ri.RepeatWith)
                        {
                            ri2.Box.RepeatList.Add(ri.Box);
                        }
                    }
                }
            }
        }
Пример #23
0
        internal override int Render(Rdl.Render.Container box, Rdl.Runtime.Context context, Rdl.Runtime.Context rowContext, int column)
        {
            if (_staticColumns.Count > FindMatrix(this).Columns.Count)
            {
                throw new Exception("There are more static column elements defined in matrix " + FindMatrix(this).Name + " than there are data columns.");
            }

            if (RenderNext != null)
            {
                if (RenderNext is ColumnGrouping)
                {
                    column = ((ColumnGrouping)RenderNext).Render(box, context, rowContext, column);
                }
                else
                {
                    RenderNext.Render(box, context.Intersect(rowContext));
                    column++;
                }
            }

            return(column);
        }
Пример #24
0
        private void RenderSubtotal(Rdl.Render.Container box, Rdl.Runtime.Context context, bool hidden, TextBox tb)
        {
            Rdl.Render.FlowContainer totalBox = box.AddFlowContainer(this, Style, context, Rdl.Render.FlowContainer.FlowDirectionEnum.LeftToRight);
            totalBox.Name = "RowTotal";
            if (tb != null)
            {
                tb.LinkedToggles.Add(new Toggle(totalBox, tb, Enums.ToggleDirectionEnum.negative));
            }

            Rdl.Render.FixedContainer totalHeader = totalBox.AddFixedContainer(this, Style, context);
            totalHeader.Name              = "RowTotalHeader";
            totalHeader.Width             = TotalWidth;
            totalHeader.MatchParentHeight = true;
            //totalHeader.Height = FindMatrix(this).Rows.Height;
            totalHeader.CanGrowHorizonally = false;

            if (_subtotal != null)
            {
                _subtotal.ReportItems.Render(totalHeader, context);
            }

            // Render the details.
            MatrixElement m = RenderNext;

            while (m is RowGrouping)
            {
                m = ((RowGrouping)m).RenderNext;
            }

            if (m is ColumnGrouping)
            {
                ((ColumnGrouping)m).Render(totalBox, FindMatrix(this).Context, context, 0);
            }
            else
            {
                m.Render(totalBox, context);
            }
        }
Пример #25
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            // Find the ActionElement
            Rdl.Render.ActionElement ae = null;

            foreach (Rdl.Render.Element e in box.Children)
            {
                if (e is Rdl.Render.ActionElement)
                {
                    ae = (Rdl.Render.ActionElement)e;
                }
            }

            if (ae == null)
            {
                throw new Exception("An action is defined where no textbox or image is contained");
            }

            if (_hyperlink != null)
            {
                ae.Hyperlink = _hyperlink.ExecAsString(context);
            }
            if (_bookmarkLink != null)
            {
                ae.BookmarkLink = _bookmarkLink.ExecAsString(context);
            }
            if (_drillthrough != null)
            {
                ae.DrillThroughReportName = _drillthrough.ReportName;
                foreach (Parameter parm in _drillthrough.Parameters)
                {
                    ae.DrillThroughParameterList.Add(
                        new Rdl.Render.ActionElement.ActionParameter(parm.Name,
                                                                     parm.Value(context)));
                }
            }
        }
Пример #26
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            bool hidden = false;

            context = new Rdl.Runtime.Context(
                context,
                null,
                null,
                _grouping,
                _sortBy);

            TextBox tb = FindToggleItem(_visibility);

            if (_visibility != null && _visibility.ToggleItem == null)
            {
                hidden = _visibility.IsHidden(context);
            }
            ;

            // Loop through all of the rows in the data context
            decimal top = 0;

            while (true)
            {
                if (_grouping == null && context.CurrentRow == null)
                {
                    break;
                }
                if (_grouping != null && context.GroupIndex >= context.GroupCount)
                {
                    break;
                }

                foreach (Row tr in _tableRows)
                {
                    Rdl.Render.FixedContainer rowBox = null;
                    if (box != null && !hidden)
                    {
                        rowBox             = box.AddFixedContainer(this, Style, context);
                        rowBox.Name        = "RowBox";
                        rowBox.Top         = top;
                        rowBox.Width       = box.Width;
                        rowBox.ContextBase = true;

                        if (tb != null)
                        {
                            tb.LinkedToggles.Add(new Toggle(rowBox, tb));
                        }
                    }

                    tr.Render(rowBox, context);

                    if (box != null && !hidden)
                    {
                        top       += rowBox.Height;
                        box.Height = top;
                    }
                }

                context.LinkToggles();
                if (_grouping == null)
                {
                    context.MoveNext();
                }
                else
                {
                    context.NextGroup();
                }
            }
        }
Пример #27
0
 internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
 {
     throw new Exception("Not Implemented");
 }
Пример #28
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            Rdl.Runtime.Context context1 = context.GetChildContext(
                null,
                null,
                _grouping,
                _sorting);

            base.Render(box, context1);

            bool hidden = false;

            if (_visibility != null && _visibility.ToggleItem == null)
            {
                hidden = _visibility.IsHidden(context1);
            }

            if (!hidden)
            {
                TextBox tb = Report.FindToggleItem(_visibility);

                Rdl.Render.FlowContainer dynamicRowsBox = null;
                if (box != null)
                {
                    // The dynamic rows box is a top down box holding all of the rows
                    // in the matrix including the total row.
                    dynamicRowsBox = box.AddFlowContainer(this, Style, context, Rdl.Render.FlowContainer.FlowDirectionEnum.TopDown);
                    dynamicRowsBox.MatchParentWidth = true;
                    dynamicRowsBox.Name             = "DynamicRows";
                }

                if ((_subtotal != null && _subtotal.Position == Subtotal.PositionEnum.Before) ||
                    (tb != null && _subtotal == null))
                {
                    RenderSubtotal(dynamicRowsBox, context, hidden, (_subtotal == null) ? tb : null);
                }

                while (context1.GroupIndex < context1.GroupCount)
                {
                    Rdl.Render.FlowContainer rowGroupBox = dynamicRowsBox.AddFlowContainer(this, Style, context1, Rdl.Render.FlowContainer.FlowDirectionEnum.LeftToRight);
                    rowGroupBox.Name = "DynamicRow";

                    if (tb != null)
                    {
                        tb.LinkedToggles.Add(new Toggle(rowGroupBox, tb));
                    }

                    Rdl.Render.FixedContainer rowGroupHeader = rowGroupBox.AddFixedContainer(this, Style, context1);
                    rowGroupHeader.Name              = "DynamicRowHeader";
                    rowGroupHeader.Width             = Width.points;
                    rowGroupHeader.MatchParentHeight = true;
                    //rowGroupHeader.Height = FindMatrix(this).Rows.Height;
                    rowGroupHeader.CanGrowHorizonally = false;
                    _reportItems.Render(rowGroupHeader, context1);

                    if (RenderNext != null)
                    {
                        if (RenderNext is RowGrouping)
                        {
                            //Rdl.Render.FlowContainer contentBox = rowGroupBox.AddFlowContainer(this, Style, context1, Rdl.Render.FlowContainer.FlowDirectionEnum.TopDown);
                            //contentBox.Name = "DynamicRowContent";
                            ((RowGrouping)RenderNext).Render(rowGroupBox, context1);
                        }
                        else if (RenderNext is ColumnGrouping)
                        {
                            ((ColumnGrouping)RenderNext).Render(rowGroupBox, FindMatrix(this).Context, context1, 0);
                        }
                        else
                        {
                            RenderNext.Render(rowGroupBox, context1);
                        }

                        //// Intersect the rows in the current column grouping with the rows in the
                        //// row grouping and if there is anything left then render the
                        //// MatrixRows.
                        //Rdl.Runtime.Context tmpContext = context1.Intersect(columnContext);
                    }

                    context1.LinkToggles();
                    context1.NextGroup();
                }

                if (_subtotal != null && _subtotal.Position == Subtotal.PositionEnum.After)
                {
                    RenderSubtotal(box, context, hidden, null);
                }
            }
        }
Пример #29
0
 internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
 {
 }
Пример #30
0
        internal override void Render(Rdl.Render.Container box, Rdl.Runtime.Context context)
        {
            Rdl.Render.FlowContainer headerBox  = null;
            Rdl.Render.FlowContainer detailsBox = null;
            Rdl.Render.FlowContainer footerBox  = null;
            Rdl.Render.FlowContainer groupRow   = null;

            context = new Rdl.Runtime.Context(
                context,
                null,
                null,
                _grouping,
                _sortBy);

            TextBox tb = Report.FindToggleItem(_visibility);

            if (box != null && !_visibility.IsHidden(context))
            {
                _box       = box.AddFlowContainer(this, Style, context, Rdl.Render.FlowContainer.FlowDirectionEnum.TopDown);
                _box.Width = box.Width;
                _box.Name  = "TableGroup";

                if (tb != null)
                {
                    tb.LinkedToggles.Add(new Toggle(_box, tb));
                }
            }

            // Render the header
            decimal groupTop = 0;

            while (context.GroupIndex < context.GroupCount)
            {
                if (_box != null)
                {
                    groupRow                 = _box.AddFlowContainer(this, Style, context, Rdl.Render.FlowContainer.FlowDirectionEnum.TopDown);
                    groupRow.Width           = _box.Width;
                    groupRow.Top             = groupTop;
                    groupRow.Name            = "GroupRrow";
                    groupRow.ContextBase     = true;
                    groupRow.PageBreakBefore = _grouping.PageBreakAtStart;
                    // Don't break page on last group item.
                    groupRow.PageBreakAfter = (context.GroupIndex + 1 < context.GroupCount) ? _grouping.PageBreakAtEnd : false;
                }

                if (_header != null)
                {
                    if (_box != null)
                    {
                        headerBox       = groupRow.AddFlowContainer(this, _header.Style, context, Rdl.Render.FlowContainer.FlowDirectionEnum.TopDown);
                        headerBox.Top   = 0;
                        headerBox.Width = groupRow.Width;
                        headerBox.Name  = "GroupHeader";
                    }

                    _header.Render(headerBox, context);
                }

                // Create a box to hold the details and tie that
                // box to any repeat lists referencing these details.
                if (_details != null && groupRow != null)
                {
                    detailsBox       = groupRow.AddFlowContainer(this, _details.Style, context, Rdl.Render.FlowContainer.FlowDirectionEnum.TopDown);
                    detailsBox.Top   = (headerBox == null) ? 0 : headerBox.Height;
                    detailsBox.Width = groupRow.Width;
                    detailsBox.Name  = "GroupDetails";

                    // If the header or footer are repeated, then add them to the repeat list of the details.
                    if (_header != null && _header.RepeatOnNewPage)
                    {
                        detailsBox.RepeatList.Add(headerBox);
                    }
                    if (_footer != null && _footer.RepeatOnNewPage)
                    {
                        detailsBox.RepeatList.Add(footerBox);
                    }
                }

                // Render the details.
                if (_details != null)
                {
                    _details.Render(detailsBox, context);
                }

                // Render the footer.
                if (_footer != null)
                {
                    if (groupRow != null)
                    {
                        footerBox      = groupRow.AddFlowContainer(this, _footer.Style, context, Rdl.Render.FlowContainer.FlowDirectionEnum.TopDown);
                        footerBox.Name = "GroupFooter";
                        footerBox.Top  = ((headerBox == null) ? 0 : headerBox.Height) +
                                         ((detailsBox == null) ? 0 : detailsBox.Height);
                        footerBox.Width = _box.Width;
                    }
                    context.RowIndex = 0;
                    _footer.Render(footerBox, context);
                }

                if (groupRow != null)
                {
                    groupTop += groupRow.Height;
                }

                context.LinkToggles();
                context.NextGroup();
            }
        }