Exemplo n.º 1
0
            public void WriteTo(XmlWriter xmlWriter)
            {
                xmlWriter.WriteStartElement("Report");
                {
                    // Namespaces
                    xmlWriter.WriteAttributeString("xmlns", "", null, "http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition");
                    xmlWriter.WriteAttributeString("xmlns", "rd", null, "http://schemas.microsoft.com/SQLServer/reporting/reportdesigner");

                    DataSources.WriteTo(xmlWriter);

                    Margin.WriteTo(xmlWriter);

                    xmlWriter.WriteElementString("rd:ReportID", rdReportID);

                    if (EmbeddedImages.Count > 0)
                    {
                        EmbeddedImages.WriteTo(xmlWriter);
                    }

                    //design properties
                    xmlWriter.WriteElementString("rd:DrawGrid", RdlcWrapper.RdlcValueConverter.GetBoolean(DrawGrid));
                    xmlWriter.WriteElementString("rd:SnapToGrid", RdlcWrapper.RdlcValueConverter.GetBoolean(SnapToGrid));

                    Body.WriteTo(xmlWriter);

                    xmlWriter.WriteElementString("Width", Width.ToString());
                    xmlWriter.WriteElementString("InteractiveHeight", InteractiveHeight.ToString());
                    xmlWriter.WriteElementString("InteractiveWidth", InteractiveWidth.ToString());

                    xmlWriter.WriteElementString("Language", Language);

                    DataSets.WriteTo(xmlWriter);
                }
                xmlWriter.WriteEndElement();
            }