2013-04-25 100 views
0

打印SSRS報告,我喜歡通過如何顯示打印對話框選擇打印機時使用按鈕,點擊

var popUpWindow = window.open('@Url.Content("~/rptViewer.aspx")' + "?date=" + date,'popUpWindow', 'channelmode=yes,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no'); 

參數傳遞到Window.open()調用一個aspx報表瀏覽器頁面,我打印使用ReportPrintDocument.cs報告如

ReportPrintDocument RP = new ReportPrintDocument(reportViewerPrint.ServerReport);RP.Print(); 

通過此報告直接打印而不顯示任何打印對話框。

現在我想顯示選擇打印機的打印對話框和打印副本的數量,並且在點擊打印對話框上的確定按鈕後,我必須打印報告......按照在打印對話框

回答

1

您當前正在打印報告服務器端(如果您正在開發,它可能與瀏覽器所在機器相同)無法顯示任何打印對話框。換句話說,它實際上不是當前正在打印的客戶端。

要打印新打開的窗口,您需要一些Javascript來執行客戶端打印。有關詳細信息,請參見this related question或直接參考the mentioned MSDN blog post

相關問題