  | 
              
	              
	                
  
    
	 
        สอบถามครับคือผมอยากจะปริ้นสองรีพอร์ตต่อหนึ่งหน้า รบกวนช่วยหน่อยครับ     | 
   
  
    |   | 
   
 
 
 
	
		
			  | 
	   | 
	    | 
		
			  | 
	 
	
		
			  | 
		 		   | 
	  	    
          
            
			
	
			
			 
                Code (PHP) 
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
* {
    margin:auto;
    padding:0;
    font-family:Arial, "times New Roman", tahoma;
    font-size:16px;
}
html {
    font-family:Arial, "times New Roman", tahoma;
    font-size:16px;
    color:#000000;
}
body {
    font-family:Arial, "times New Roman", tahoma;
    font-size:16px;
    padding:0;
    margin:0;
    color:#000000;
}
.headTitle {
    font-size:14px;
    font-weight:bold;
    text-transform:uppercase;
}
.headerTitle01 {
    border:1px solid #333333;
    border-left:2px solid #000;
    border-bottom-width:2px;
    border-top-width:2px;
    font-size:11px;
}
.headerTitle01_r {
    border:1px solid #333333;
    border-left:2px solid #000;
    border-right:2px solid #000;
    border-bottom-width:2px;
    border-top-width:2px;
    font-size:11px;
}
@media print
{
	#hid { display:none;}
    .page-break { display:block;height:1px; page-break-before:always; }
    .page-break-no{ display:block;height:1px; page-break-after:avoid; } 
}
/* กำหนดเส้นใต้บรรทัด */
.southern_bottom {
    border-bottom:2px solid #000;
}
/* กำหนดจุดเส้นใต้บรรทัด */
.dotted_bottom {
    border-bottom:1px dotted;
}
/* กำหนดเส้นบนและใต้บรรทัด */
	.north_top {
		border-top:2px solid #000;
		border-bottom:2px solid #000;
	}
td {
	font-size: 10px;
}
td {
	font-size: 16px;
}
</style>
<script language="JavaScript">
function NOPopup()
{
window.open('','_self');
self.close(); 
}
</script> 
</head>
<body>
<main id="main">
<section id="about" class="wow fadeInUp">
<?php
	include('condb.ua.php');
	
	$strSQL = "SELECT * FROM total_qty WHERE  MONTH(p_datestart)= MONTH(now()) AND p_qty>0 ORDER BY m_id ASC";
	$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); 
?>
<div class="page-break<?=($i==1)?"-no":""?>"> </div>
<br />
<table width="940" border="0" align="center" cellpadding="0" cellspacing="0" >
		<tr>
          <td height="27"> </td>
          <td align="left"> </td>
          <td width="150" align="left"> </td>
          <td align="right">หน้าที่ <?=$i?> </td>
        </tr>
        <tr>
          <td height="27"> </td>
          <td width="150" align="left"> </td>
          <td align="left"> </td>
          <td width="320" align="right">วันที่/Date : <?php echo  $date; ?>  </td>
        </tr>
        <tr>
          <td height="27" align="center"> </td>
          <td height="27" colspan="2" align="center">ใบเบิกของประจำเดือน</td>
          <td height="27" align="center"> </td>
        </tr>
        <tr>
          <td height="27"> </td>
          <td colspan="2" align="center">ประจำเดือน/Month <?php echo $month; ?></td>
          <td align="left"> </td>
        </tr>
        <tr>
          <td height="27"> </td>
          <td colspan="2" align="left"> </td>
          <td align="left"> </td>
        </tr>
        <tr>
          <td width="320" height="27">สาขาที่เบิก.<?php echo $objResult["m_group"];?></td>
          <td colspan="2" align="left">วันที่เขอเบิก : <?php echo  $date; ?></td>
          <td align="left">ชื่อพนักงาน : <?php echo $objResult["m_name"];?></td>
        </tr>
       <tr class="north_top">
        <td width="320" height="27" align="center" style="text-align: left">   รายการ/Destinationa</td>
        <td width="150" align="center" style="text-align: left"> </td>
        <td align="left" style="text-align: right" > </td>
        <td align="left" style="text-align: right" >จำนวนเงิน/Amount   </td>
      </tr>
      <tr>
        <td height="27" colspan="3" align="center" style="text-align: left">   อาหารเสริมเพื่อสุขภาพ</td>
        <td width="320" align="left" style="text-align: right" ><?php echo number_format($objResult["m_price1"], 2);?>   </td>
      </tr>
      <tr>
        <td height="27" colspan="3" align="center" style="text-align: left">   เครื่องใช้ในครัวเรือน</td>
        <td align="left" style="text-align: right" ><?php echo number_format($objResult["m_price2"], 2);?>   </td>
      </tr>
      <tr>
        <td height="27" colspan="3" align="center" style="text-align: left">   เครื่องสำอาง</td>
        <td align="left" style="text-align: right" ><?php echo number_format($objResult["m_price3"], 2);?>   </td>
      </tr>
      <tr>
        <td height="27" colspan="3" align="center" style="text-align: left">   อุปกรณ์เครื่องเขียน</td>
        <td align="left" style="text-align: right" ><?php echo number_format($objResult["m_price4"], 2);?>   </td>
        </tr>
      <tr>
        <td height="27" colspan="3" align="center" class="southern_bottom" style="text-align: left">   อื่นๆ</td>
        <td align="left" style="text-align: right" class="southern_bottom"><?php echo number_format($objResult["m_price5"], 2);?>   </td>
        </tr>
      <tr>
        <td width="320" height="27" align="center" class="southern_bottom" style="text-align: left">   รวมทั้งสิ้น/Total</td>
        <td width="150" height="27" align="center" class="southern_bottom" style="text-align: left"> </td>
        <td align="left" style="text-align: right" class="southern_bottom"> </td>
        <td align="left" style="text-align: right" class="southern_bottom"><?php echo number_format($objResult["p_qty"], 2);?>   </td>
        </tr>
      <tr>
        <td width="320" height="27" align="center" style="text-align: left">   หมายเหตุ/Remark</td>
        <td width="150" height="27" align="center" style="text-align: left"> </td>
        <td align="left" style="text-align: right"> </td>
        <td align="left" style="text-align: right"><?php echo number_format($objResult["remark"], 2);?>   </td>
        </tr>
      <tr>
      <td align="left"> </td>
      <td align="left"> </td>
      <td height="27" align="left">ลงชื่อ/Signature</td>
      <td width="320" align="left">................................................................</td>
      
        </tr>
      <tr>
        <td height="37" align="left"> </td>
        <td height="37" align="left"> </td>
        <td height="37" align="left"> </td>
        <td height="37" align="left" > .................../..................../.......................</td>
        
        </tr>
      <tr>
        <td width="320" align="left"> </td>
        <td width="150" align="left"> </td>
        <td height="36" align="left"> </td>
        <td height="36" align="left" > (..............................................................)</td>
       
     </tr>
    
</table>
<?php 
$i++; } 
mysql_close($objConnect);
?>
</section>
</main>
</body>
</html>
 
 
  Tag : PHP               
                        | 
           
          
            
		
  ประวัติการแก้ไข 2018-11-06 17:19:58	
                             | 
           
          
            
              
                   | 
                   | 
                   | 
               
              
                   | 
                
                    
                      | Date :
                          2018-11-03 16:52:47 | 
                      By :
                          HLEW | 
                      View :
                          677 | 
                      Reply :
                          7 | 
                     
                  | 
                   | 
               
              
                   | 
                   | 
                   | 
               
              | 
           
          
            | 
			 | 
           
         
	    
		             | 
		
			  | 
	 
	
		
			  | 
		  | 
		
			  | 
		
			  | 
	 
 
              
  
          
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 มีท่านใดรู้วิธีหรือแนวทางบางครับรบกวนช่วยหน่อย คือเท่าที่ทำได้ตอนนี้คือแผ่น 1-2 ปริ้นออกหน้าเดียวกันได้ แต่แผ่นที่ 3,4,5,6...มันอยู่คนละแผ่นครับ                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-05 09:00:23 | 
                        By :
                            HLEW | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 ลองแก้ไขโดยการ 
 
<div class="page-break<?=(($i%2)==0)?"-no":""?>"> </div>                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-05 11:11:18 | 
                        By :
                            zcoolmax | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 html to pdf ... ในหลายๆ เจ้า อาจจะช่วยได้ครับ                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-05 13:40:41 | 
                        By :
                            apisitp | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	     
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 ถ้าไม่ได้เป็น PDF ผมบอกเลยว่ามันจะเหนื่อยมากอย่างสาหัส ถ้าปรินท์เยอะๆนะ. 
ผมเคยทำตัว print ออกใบเสร็จชนิดที่เรียงตามห้องทีละเยอะๆ มันทำลำบากมาก แล้วถ้าทำลงตัวแล้วเปลี่ยนเบราเซอร์ทีก็เพี้ยนได้อีก สุดท้ายใช้วิธีแบบข้างบนว่า ทำเป็น PDF ซะแล้วขนาดมันเป๊ะดั่งใจ พิมพ์รวดเดียวสบายๆ                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-06 07:39:27 | 
                        By :
                            mr.v | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
               
		
     
		
	     
	    
     
               
		
     
		
	  
        
             | 
            | 
            | 
             | 
         
        
             | 
                       | 
          
            
               
                 ขอบคุณพี่ๆทั้งสองมากครับเดี๋ยวผมจะลองศึกษาและลองปรับใช้งานดูครับผม                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2018-11-06 11:24:18 | 
                        By :
                            HLEW | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             | 
         
        
             | 
            | 
             | 
             | 
         
          
	    
     
      		  
	
     | 
   
 
                 |