private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            string FormNo = string.Empty;
            string ReportName = string.Empty;
            FormNo = txtFormNo.Text;
            ReportName = "InHouse";
            ScriptObject Show = HtmlPage.Window.GetProperty("Show") as ScriptObject;
            Show.InvokeSelf(FormNo, ReportName);

        }

 

        function Show(FormNo, ReportName) {
           
            var IHeight = 400;
            var IWidth = 1000;
            var ITop = (window.screen.height - IHeight) / 2;
            var ILeft = (window.screen.width - IWidth) / 2;
            window.open("Print/PrintPages.aspx?FormNo=" + FormNo + "&ReportName=" + ReportName + "", "newwindow", "height=" + IHeight + ",   width=" + IWidth + ",   top=" + ITop + ",   left=" + ILeft + ",   toolbar=no,   menubar=no,   scrollbars=yes,   resizable=yes,location=no,   status=no");
        }

posted on 2010-05-19 13:44  sweting  阅读(1128)  评论(0编辑  收藏  举报