예제 #1
0
        internal FlowContainer AddFlowContainer(RdlEngine.ReportElement reportElement, RdlEngine.Style style)
        {
            FlowContainer child = new FlowContainer(this, reportElement, new BoxStyle(style));

            _childElements.Add(child);
            return(child);
        }
예제 #2
0
        public Container(Container b, bool copyChildren)
            : this(b)
        {
            if (copyChildren)
            {
                foreach (Element e in b._childElements)
                {
                    Element newElement = null;
                    if (e is FixedContainer)
                    {
                        newElement = new FixedContainer((FixedContainer)e, true);
                    }
                    if (e is FlowContainer)
                    {
                        newElement = new FlowContainer((FlowContainer)e, true);
                    }
                    if (e is TextElement)
                    {
                        newElement = new TextElement((TextElement)e);
                    }
                    if (e is ImageElement)
                    {
                        newElement = new ImageElement((ImageElement)e);
                    }

                    newElement.Parent = this;
                    _childElements.Add(newElement);
                }
            }
        }
예제 #3
0
        private decimal CalcHeight(Element elmt)
        {
            if (elmt is Container)
            {
                Container c = elmt as Container;

                if (c.Toggle != null && c.Toggle.ToggleState == TextElement.ToggleStateEnum.closed)
                {
                    return(0);
                }
            }
            if (elmt is FlowContainer)
            {
                decimal height = 0;

                FlowContainer fc = elmt as FlowContainer;
                foreach (Element child in fc.Children)
                {
                    height += CalcHeight(child);
                }
                return(height);
            }
            else
            {
                return(elmt.Height);
            }
        }