<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
  <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.css"/>
  <script type="text/javascript" src="https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.js"></script>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<!-- jQuery Library -->

<!-- Datatable JS -->

<!-- HTML -->
<div >
   <!-- Custom Filter -->
   <table>
     <tr>
       <td>
         <input type='text' id='searchByOffer' placeholder='Enter Offer Name'>
       </td>
       <td>
         <select id='searchByAffiliate'>
        <option value="all" selected="">All Affiliate</option>
	<option value="1">afnads - (1)</option>
	<option value="2">Affnads Solutions Pvt Ltd. - (2)</option>
	<option value="7">adsad - (7)</option>
	<option value="8">Karan Adwords - (8)</option> 
	</select>
       </td>
     </tr>
  </table>
<table id="customer_data" class="table table-bordered table-striped">
   <!-- Table -->
     <thead>
       <tr>
         <th>Offer id</th>
         <th>Name</th>
         <th>Affiliate</th>
         <th>clicks</th>
         <th>Uclick</th>
       </tr>
     </thead>

   </table>
</div>
<script type="text/javascript" language="javascript" >
 $(document).ready(function(){

  $('#customer_data').DataTable({
   "processing" : true,
   "serverSide" : true,
   "ajax" : {
    url:"areport",
    type:"POST"
   },
   dom: 'lBfrtip',
   buttons: [
    'excel', 'csv', 'pdf', 'copy'
   ],
   "lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ]
  });
  
 });
 
</script>
