Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 27, 2012 08:21 PM by Cathy Mi - MSFT
Member
306 Points
524 Posts
Mar 19, 2012 07:08 AM|LINK
Dear All,
How can i add in Javascript disable right click as below into .rdl report:-
<script language="JavaScript">
var message="Sorry, No Right Click Allowed!!!";
function clickIE6(){
if (event.button==2){
alert(message);
return false;
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE6;
document.oncontextmenu = new Function("alert(message);return false");
</script>
MVC:
window.open("http://xxx/ReportServer/Pages/ReportViewer.aspx?%2fRpt%2fViewDetail&rs:Command=Render&rc:Parameters=True&rs:Command=Render&ANo="+ANo.substr(1)+"&Module=@Request["module"]&Link=@Request["category"]", "List", "toolbar=no, scrollbars=yes,resizable=no,width=1450,height=580");
Please Advise.
Thank you.
Regards,
Micheale
741 Points
165 Posts
Microsoft
Mar 27, 2012 08:21 PM|LINK
Hi,
Perhaps you will get an answer in the Report Viewer forum:
http://social.msdn.microsoft.com/Forums/en/vsreportcontrols/threads/
Thanks,
Cathy Miller
micnie2020
Member
306 Points
524 Posts
How to disable right click on SSRS report inside MVC using window.open
Mar 19, 2012 07:08 AM|LINK
Dear All,
How can i add in Javascript disable right click as below into .rdl report:-
<script language="JavaScript">
var message="Sorry, No Right Click Allowed!!!";
function clickIE6(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE6;
}
document.oncontextmenu = new Function("alert(message);return false");
</script>
MVC:
window.open("http://xxx/ReportServer/Pages/ReportViewer.aspx?%2fRpt%2fViewDetail&rs:Command=Render&rc:Parameters=True&rs:Command=Render&ANo="+ANo.substr(1)+"&Module=@Request["module"]&Link=@Request["category"]", "List", "toolbar=no, scrollbars=yes,resizable=no,width=1450,height=580");
Please Advise.
Thank you.
Regards,
Micheale
Cathy Mi - M...
Member
741 Points
165 Posts
Microsoft
Re: How to disable right click on SSRS report inside MVC using window.open
Mar 27, 2012 08:21 PM|LINK
Hi,
Perhaps you will get an answer in the Report Viewer forum:
http://social.msdn.microsoft.com/Forums/en/vsreportcontrols/threads/
Thanks,
Cathy Miller