title: How to fix Number of rows in detail section and insert blank rows if number of record less than rows fixed in detail section
body: <p>I want to print three pay slips in an A4 size page. Page header and footer are fixed number of rows.  </p>
  
  <p>I want <em>Detail</em> section to print <strong>8 records</strong>. If records are <em>less than 8</em>, remaining line should be blank printed and <em>3 pay slip</em> print on one page.</p>
  
  <p>Input parameters are <em>Month</em> and <em>Year</em>. I grouped each pay slip with <code>personnel_id</code> and placed the <code>personel_id</code>, <code>name</code> and <code>bank account no.</code>  on group header section.</p>
  
  <p>In detail section </p>
  
  <pre><code>Earnings:               Total
  Basic pay               20000
  Arrear                   1000
  Qualification Pay         500
  Deduction:      
  Medical  Fee             2000
  Club Fee                 1000
  </code></pre>
  
  <p>
  In Group footer</p>
  
  <pre><code>Total Earning           21500
  Total Deduction          3000
  Net Pay                 18500
  </code></pre>
  
  <p>Sometimes <em>Earning</em> has only one record and sometimes <em>deduction</em> has only one record.
  I want to fix detail section with 8 or 10 rows and also 2 or 3 pay slips in one A4 size page.
  Thanks.</p>
  
  <p>Sample Data </p>
  
  <pre><code>E=Earnings
  D=Deductions
  Personnel  ID   EDname          Cur_amount  EDCode  EDtype  P_Month  P_Year
  17777-7      Basic Pension         20000     401       E       4       2014
  17777-7         Arrear             1000      402       E       4       2014
  17777-7     Qualification Alw.     5000      403       E       4        2014
  17777-7      Medical Fee           2000      501       D       4       2014
  17777-7       Club Fee             1000      502       D       4       2014
  18888-8      Medical Fee           1500      501       D       4       2014
  18888-8        Club Fee            700        502      D       4       2014
  </code></pre>
  
  <p>Report format on one page id just like below</p>
  
  <pre><code>Personnel_id:18888-8                              Pay Slip
   Name:            xyz                             Month  April, 2014   //`Group Header`
  Account_No. 123444
  Deduction:
  Medical Fee                      1500.00
  Club Fee                         700.00                       // `Detail Section`
  Total Earning:                    0.00                       //    `Group Footer` 
  Total Deduction:                 -2200.00
  Net pay                         -2200.00  
  </code></pre>
  
  <hr>
  
  <pre><code>Personnel_id:17777-7                              Pay Slip
   Name:            ABC                             Month  April, 2014
  Account_No. 123456
   Earnings:                                      
  Basic Pension                 20000.00                    
  Arrear                        1000.00
  Qualification Alw.            5000.00  
  Deduction:
  Medical Fee                   2000.00
  Club Fee                      1000.00
  Total Earning:                21500.00
  Total Deduction:              3000.00
  Net pay                       18500.00  
  </code></pre>
  
  <hr>
  
  <p>according to your formula result of first pay slip is</p>
  
  <pre><code>Personnel_id:18888-8                              Pay Slip
   Name:            xyz                             Month  April, 2014
  Account_No. 123444
  
   Earnings:                                      
  Basic Pension                                    
  Arrear                             
  Qualification Alw.           
  Deduction:
  Medical Fee                      1500.00
  Club Fee                         700.00
  Total Earning:                   0.00
  
  Total Deduction:                -2200.00
  Net pay                          -2200.00  
  </code></pre>
  
  <p>needed remaining 6 blank  lines in detail section after Club fee </p>