Last post Sep 06, 2011 06:00 PM by wadewalker25
Member
29 Points
966 Posts
Aug 27, 2011 06:22 AM|craigbtx|LINK
I am using the report viewer in a webpage.
Is there any way to disable the print icon in the tool bar AFTER the user has clicked on it?
Or putting it another way, is there anyway to allow only clicking once on the print icon.
The work around or soultion does not have to be pretty or elegant, just functional.
Even if I put a button on the page that programmatically prints the report?
Thanks
106 Points
114 Posts
Sep 06, 2011 06:00 PM|wadewalker25|LINK
I'm thinking one way would be as follows:
Add a beginPageRequest to the page in the documentReady funciton:
$(document).ready(function () { Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest); });
Add the beginRequest function:
var printedAlready = 0 function beginRequest(sender, args) { if (sender._postBackSettings.sourceElement.name.indexOf('ctl00$cphBody$rv1$ctl05$ctl06$ctl00$ctl00$ctl00') > 0) { if (printedAlready = 1) { return false; } else { printedAlready = 1 }; }; };
Let me know if this works will you
Member
29 Points
966 Posts
Printing report in a webviewer
Aug 27, 2011 06:22 AM|craigbtx|LINK
I am using the report viewer in a webpage.
Is there any way to disable the print icon in the tool bar AFTER the user has clicked on it?
Or putting it another way, is there anyway to allow only clicking once on the print icon.
The work around or soultion does not have to be pretty or elegant, just functional.
Even if I put a button on the page that programmatically prints the report?
Thanks
Member
106 Points
114 Posts
Re: Printing report in a webviewer
Sep 06, 2011 06:00 PM|wadewalker25|LINK
I'm thinking one way would be as follows:
Add a beginPageRequest to the page in the documentReady funciton:
Add the beginRequest function:
Let me know if this works will you