0

I am calling an aspx report viewer page by passing parameters to Window.open() like

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');

and i am printing the report using ReportPrintDocument.cs like

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

By this the report is printing directly without showing any print dialogue.

Now i want to show the print dialogue for selecting the printer and no of copies to print.. and after clicking on the OK button on print dialogue i have to print the report... as per the options selected in the print dialogue

Meraj
  • 426
  • 3
  • 10
  • 22

1 Answers1

1

You're currently printing the report server side (which may be the same machine as the browser's on if you're developing) which has no way to show any print dialog. In other words it's actually not the client that's printing currently.

To print the newly opened window you'll need some Javascript to execute a client-side print. For details, see this related question or directly refer to the mentioned MSDN blog post.

Community
  • 1
  • 1
Jeroen
  • 60,696
  • 40
  • 206
  • 339