Every application all over world is in fond of key controlled or having shortcuts to report view. I have implemented this with some Javascript.
Step:1: By Default , report should not be visible , So we have added attribute to region as:
Region Attributes : style= “display:none;”
Step: 2: Create a new html region and following javascript code for key recognition and report view : [Shortcut Key: Ctrl+S]
<html>
<head>
<script>
function test(e) {
e = e || window.event; //Get event
if (e.ctrlKey) {
var c = e.which || e.keyCode; //Get key code
switch (c) {
case 83:// Block Ctrl+S
e.preventDefault(); // Prevents Default Fuctionality
e.stopPropagation();
$("#TEST_REPORT").dialog(); // Opens Dialog
}
}
};
</script>
</head>
<body onkeydown="javascript:test(event);"> </body>
</html>
No comments:
Post a Comment