protected override void WriteContentTo(XRWriteInfo writeInfo, VisualBrick brick)
        {
            if ((writeInfo != null) && (brick is SubreportBrick))
            {
                XRDataContainerPrintCache printCache  = new XRDataContainerPrintCache(this);
                SubreportDocumentBand     controlBand = new SubreportDocumentBand(brick.Rect);

                ((SubreportBrick)brick).DocumentBand = controlBand;

                InitializeControlArea(DocumentBandKind.PageHeader, controlBand, writeInfo, printCache);
                InitializeControlArea(DocumentBandKind.Detail, controlBand, writeInfo, printCache);
                this.WriteContentToCore(writeInfo, brick);
            }
            else
            {
                base.WriteContentTo(writeInfo, brick);
            }
        }
        internal void InitializeControlArea(DocumentBandKind bandKind, DocumentBand parentBand, XRWriteInfo writeInfo, XRDataContainerPrintCache cache)
        {
            DocumentBand band = new DocumentBand(bandKind, 0);

            parentBand.Bands.Add(band);
            DataContainerBrick brick = CreateContainerBrick(this, bandKind.Equals(DocumentBandKind.PageHeader)); // 'Equals()' instead of '==' is for VB Converter

            brick.PrintCache = cache;
            this.PutStateToBrick(brick, writeInfo.PrintingSystem);
            VisualBrickHelper.InitializeBrick(brick, writeInfo.PrintingSystem, brick.Rect);
            band.Bricks.Add(brick);
        }