<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportViewer.aspx.cs" Inherits="POSBilling.Reports.WebForm1" %>

<%--<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>--%>
<%@ Register assembly="CrystalDecisions.Web" namespace="CrystalDecisions.Web" tagprefix="CR" %>
<script src="../../aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/crv.js" type="text/javascript" > 
</script>
<!DOCTYPE html>
 <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>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>


     
<body>
   <form id="form1" runat="server">
        <input type="button" id="btnPrint" value="Print" style="margin-bottom:5px; font-family:Verdana;font-size:15px;font-weight:bold;color:blue" onclick="Print()" />&nbsp;&nbsp;<asp:DropDownList ID="DropDownList1" runat="server" Font-Bold="True" Font-Size="Medium" Width="200px">
            <asp:ListItem>Duplicate Copy</asp:ListItem>
            <asp:ListItem>Original Copy</asp:ListItem>
            <asp:ListItem>Triplicate Copy</asp:ListItem>
            <asp:ListItem>Transport Copy</asp:ListItem>
            <asp:ListItem>Driver Copy</asp:ListItem>
        </asp:DropDownList>
        &nbsp;&nbsp;<asp:Button ID="Button1" runat="server" Font-Bold="True" ForeColor="Blue" OnClick="Button1_Click" Text="Copy Bill" />
        &nbsp;&nbsp;<asp:Button ID="Button2" runat="server" Font-Bold="True" ForeColor="Blue"  Text="Send Mail" OnClick="Button2_Click1" />
&nbsp;<div id="dvReport">


    <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" HasToggleGroupTreeButton="False" HasToggleParameterPanelButton="False" ToolPanelView="None" />


</div>
           <script type="text/javascript">
               function Print() {
                   var dvReport = document.getElementById("dvReport");
                   var frame1 = dvReport.getElementsByTagName("iframe")[0];
                   if (navigator.appName.indexOf("Internet Explorer") != -1 || navigator.appVersion.indexOf("Trident") != -1) {
                       frame1.name = frame1.id;
                       window.frames[frame1.id].focus();
                       window.frames[frame1.id].print();
                   }
                   else {
                       var frameDoc = frame1.contentWindow ? frame1.contentWindow : frame1.contentDocument.document ? frame1.contentDocument.document : frame1.contentDocument;
                       frameDoc.print();
                   }
               }
    </script>
</form>
</body>
</html>
