<%@ Page Language="c#" CodeBehind="HarmBledyZbiorczoWydruk.aspx.cs" AutoEventWireup="True" Inherits="KOLKaP_WEB.KOLKaP.HarmBledyZbiorczoWydruk" %>

<%@ Register TagPrefix="dx" Namespace="DevExpress.XtraReports.Web" Assembly="DevExpress.XtraReports.v14.2.Web, Version=14.2.10.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>HarmBledyZbiorczoWydruk</title>
    <script type="text/javascript">
                   function init(s) {
                     var createFrameElement = s.viewer.printHelper.createFrameElement;
                     s.viewer.printHelper.createFrameElement = function (name) {
                       var frameElement = createFrameElement.call(this, name);
                       var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
                       if (isChrome) {
                         frameElement.addEventListener("load", function (e) {
                           if (frameElement.contentDocument && frameElement.contentDocument.contentType !== "text/html")
                             frameElement.contentWindow.print();
                         });
                       }
                       return frameElement;
                     }
                   }
    </script>
</head>
<body>
    <form id="Form2" method="post" runat="server">
        <div>
            <asp:Label ID="lblError" runat="server"></asp:Label>
            <br />
            <div>
                <dx:ASPxDocumentViewer ID="dv" runat="server" ToolbarMode="Ribbon">
                  <ClientSideEvents Init="init" />
                </dx:ASPxDocumentViewer>
            </div>
        </div>
    </form>
</body>
</html>
