Example #1
0
        public static RDLMetaData Load(System.Xml.Linq.XDocument doc)
        {


            var m = new RDLMetaData();
            m.Namespace = SSRSCommon.RSUtil.GetNamespace(doc);

            var root = doc.Root;


            var ph = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "PageHeight").Value);
            var pw = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "PageWidth").Value);

 
            
            var ml = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "LeftMargin").Value);
            var mr = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "RightMargin").Value);
            var mt = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "TopMargin").Value);
            var mb = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "BottomMargin").Value);


            m.PageSize = new System.Drawing.SizeF(pw, ph);
            m.MarginBottom = mb;
            m.MarginLeft = ml;
            m.MarginRight = mr;
            m.MarginTop = mt;

            return m;
        }
Example #2
0
        public static RDLMetaData Load(System.Xml.Linq.XDocument doc)
        {
            var m = new RDLMetaData();

            m.Namespace = SSRSCommon.RSUtil.GetNamespace(doc);

            var root = doc.Root;


            var ph = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "PageHeight").Value);
            var pw = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "PageWidth").Value);



            var ml = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "LeftMargin").Value);
            var mr = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "RightMargin").Value);
            var mt = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "TopMargin").Value);
            var mb = m.ParseLength(ExtensionMethods.ElementRDL2005(root, "BottomMargin").Value);


            m.PageSize     = new System.Drawing.SizeF(pw, ph);
            m.MarginBottom = mb;
            m.MarginLeft   = ml;
            m.MarginRight  = mr;
            m.MarginTop    = mt;

            return(m);
        }