<!-- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="reportViewer.aspx.cs" Inherits="Default" %>

<%@ Register TagPrefix="telerik" Assembly="Telerik.ReportViewer.WebForms" Namespace="Telerik.ReportViewer.WebForms" %>
 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <title>Report</title>
    <style type="text/css">			
		html#html, body#body, form#form1, div#content, center#center
		{	
			/*border: 0px solid black;*/
			padding: 0px;
			margin: 0px;
			height: 100%;
		}
    </style>
</head>
<body id="body">
    <form id="form1" runat="server">              
    <div id="content"><center id="center"><telerik:ReportViewer id="ReportViewer1" runat="server" ViewMode="PrintPreview"  style="border:1px solid #ccc;" 
			width="99%" height="99%"/></center></div>
    </form>
</body>
<script type="text/javascript">
    // Overriding the PDF method of report printing
    ReportViewer.prototype.PrintReport = function() {
        switch (this.defaultPrintFormat) {
            case "Default":
                this.DefaultPrint();
                break;
            case "PDF":
                this.PrintAs("PDF");
                previewFrame = document.getElementById(this.previewFrameID);
                previewFrame.onload = function() {
                    this.contentDocument.execCommand("print", true, null);
                }
                break;
        }
    };
</script>

<script>
    
    function docReady(fn) {
        // see if DOM is already available
        if (document.readyState === "complete" || document.readyState === "interactive") {
            // call on next available tick
            setTimeout(fn, 1);
        } else {
            document.addEventListener("DOMContentLoaded", fn);
        }
    }    

    docReady(function() {
          let frameElement = document.getElementById("ReportViewer1ParametersArea");
          frameElement.onload = function(){
                var doc=this.contentWindow.document;
                var z = document.createElement("style"); 
                z.innerHTML = '/*body{margin:0;padding:0;background:red}*/span.ParameterEditor label {visibility: hidden;position: relative;}span.ParameterEditor label:after {visibility: visible;position: absolute;top: 0;left: 0;	content: "ALL";}';
                doc.head.appendChild(z)
          };
    });
</script>
</html>
