In my asp.net mvc 2.0, I have created a report in the View which includes a header, footer, and content from searching for each record. The goal is to provide users with a preview of what they want to print before allowing them to click on a link or button to initiate the printing process.
The current approach being used is:
function printChart() {
var URL = "EvaluatingReport";
var W = window.open(URL);
W.window.print();
}
However, this method opens the URL again. Is there a way to specify the URL for window.print()
without opening it again?
Thank you in advance.