示例#1
0
        private void WriteRunningTotals(XmlTextWriter xml, ReportWriter.DataSource dataSource)
        {
            if (!string.IsNullOrWhiteSpace(dataSource.RunningTotalTextColumnIndex))
            {
                int index = Conversion.TryCastInteger(dataSource.RunningTotalTextColumnIndex);
                xml.WriteElementString("RunningTotalTextColumnIndex", index.ToString());
            }

            if (!string.IsNullOrWhiteSpace(dataSource.RunningTotalFieldIndices))
            {
                xml.WriteElementString("RunningTotalFieldIndices", dataSource.RunningTotalFieldIndices);
            }
        }
示例#2
0
 private void WriteParameter(XmlTextWriter xml, ReportWriter.ReportParameter parameter)
 {
     xml.WriteStartElement("Parameter");
     xml.WriteAttributeString("Name", parameter.Name);
     xml.WriteAttributeString("Type", parameter.Type);
     xml.WriteAttributeString("TestValue", parameter.TestValue);
     xml.WriteEndElement();
 }
示例#3
0
        private void WriteDataSource(XmlTextWriter xml, ReportWriter.DataSource dataSource)
        {
            xml.WriteStartElement("DataSource");
            xml.WriteElementString("Query", dataSource.Query);

            if (dataSource.Parameters.Any())
            {
                xml.WriteStartElement("Parameters");

                foreach (ReportWriter.ReportParameter parameter in dataSource.Parameters)
                {
                    this.WriteParameter(xml, parameter);
                }
                xml.WriteEndElement();
            }

            this.WriteRunningTotals(xml, dataSource);

            xml.WriteEndElement();
        }
示例#4
0
        private void WriteGridView(XmlTextWriter xml, ReportWriter.Grid grid)
        {
            xml.WriteStartElement("GridView");
            xml.WriteStartElement("GridViewDataSource");
            xml.WriteAttributeString("Index", grid.DataSourceIndex.ToString());

            if (!string.IsNullOrWhiteSpace(grid.CssClass))
            {
                xml.WriteAttributeString("CssClass", grid.CssClass);
            }

            if (!string.IsNullOrWhiteSpace(grid.Style))
            {
                xml.WriteAttributeString("Style", grid.Style);
            }

            xml.WriteEndElement();
            xml.WriteEndElement();
        }
示例#5
0
 private void WriteParameter(XmlTextWriter xml, ReportWriter.ReportParameter parameter)
 {
     if (string.IsNullOrWhiteSpace(parameter.Name))
     {
         return;
     }
     xml.WriteStartElement("Parameter");
     xml.WriteAttributeString("Name", parameter.Name);
     xml.WriteAttributeString("Type", parameter.Type);
     xml.WriteAttributeString("TestValue", parameter.TestValue);
     xml.WriteEndElement();
 }