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); } }
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(); }
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(); }
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(); }
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(); }