//TODO: Code Review Issue 11/05/05: Give a more detailed summary.
        // Done 24/05/2005
        /// <summary>
        /// Makes object render itself as an RDL TableCell to an XmlWriter instance.
        /// </summary>
        /// <param name="xmlWriter">The XMLWriter to be rendered to.</param>
        public void Render(XmlWriter xmlWriter)
        {
            string TextboxValue = _isEmpty ? "" : "=Fields!" + _name + ".Value";
            string Alignment    = RdlFormatter.FormatAlignment(_dataType);

            _textboxStyle.Format = RdlFormatter.FormatData(_dataType);

            xmlWriter.WriteStartElement("TableCell");
            xmlWriter.WriteStartElement("ReportItems");
            RdlRender.AddTextbox(xmlWriter, "Details" + _name, TextboxValue, _textboxStyle,
                                 Alignment, "0in", "0in", ".5in", "true", "", "", "", "", "", "", "", "", "", "");
            xmlWriter.WriteEndElement();
            xmlWriter.WriteEndElement();
        }
        /// <summary>
        /// Makes object render itself as an RDL TableCell to an XmlWriter instance.
        /// </summary>
        /// <param name="xmlWriter">The XMLWriter to be rendered to.</param>
        public void Render2010(XmlWriter xmlWriter)
        {
            string TextboxValue = _isEmpty ? "" : "=Fields!" + _name + ".Value";
            string Alignment    = RdlFormatter.FormatAlignment(_dataType);

            _textboxStyle.Format = RdlFormatter.FormatData(_dataType);

            xmlWriter.WriteStartElement("TablixCell");
            xmlWriter.WriteStartElement("CellContents");
            RdlRender.AddTextbox2010(xmlWriter, "Details" + _name, TextboxValue, _textboxStyle,
                                     Alignment, "0in", "0in", ".5in", "true", "", "", "", "", "", "", "", "", "", "", _hyperlink);
            xmlWriter.WriteEndElement(); //CellContents
            xmlWriter.WriteEndElement(); //TablixCell
        }
Exemplo n.º 3
0
        /// <summary>
        /// Makes object render itself as an RDL TableCell to an XmlWriter object.
        /// </summary>
        /// <param name="xmlWriter">The XMLWriter to be rendered to.</param>
        public void Render2010(XmlWriter xmlWriter)
        {
            string TextboxValue = "";

            // If this textbox is empty and the data that its column represents may
            // be summed, then it displays the sum of the values in its column
            // that are within its group.
            if (_isEmpty)
            {
                /* TEMPORARILY REMOVED */
                if (_isSummable)
                {
                    if (_groupingLevel == 0)
                    {
                        TextboxValue = @"=Sum(Fields!" + _itemName + ".Value)";
                    }
                    else
                    {
                        // Only give this textbox a value if the field this textbox is grouped by
                        // is at a lower or equal grouping level than this textbox
                        if (_newGroupListIndex <= _groupingLevel)
                        {
                            TextboxValue = @"=Sum(iif(Fields!GroupingLevel.Value <= " + _groupingLevel +
                                           ", cdbl(Fields!" + _itemName + ".Value), cdbl(0)), " + '\u0022' + "Grouping" + _groupName + '\u0022' + ")";
                        }
                    }
                }
                /* */
            }
            else
            {
                TextboxValue = "=Fields!" + _name + ".Value";
            }
            _textboxStyle.Format = RdlFormatter.FormatData(_dataType);

            xmlWriter.WriteStartElement("TablixCell");
            xmlWriter.WriteStartElement("CellContents");
            RdlRender.AddTextbox2010(xmlWriter, "Group" + _name, TextboxValue, _textboxStyle,
                                     RdlFormatter.FormatAlignment(_dataType), "0in", "0in", ".5in", "true",
                                     "", "", "", "", "", "", "", "", "", "", _hyperlink);
            xmlWriter.WriteEndElement(); //CellContents
            xmlWriter.WriteEndElement(); //TablixCell
        }