title: iReport: add page number to multiple page subreport
body: <p>I am using iReport 4.0.2 to create a Main Report which contains one subreport. 
  I try to add some static text in the Page-Header-Band and Page-Footer-Band of the subreport and I expect that the text in Page-Header-Band and Page-Footer-Band will be repeated, but these text are only shown in the first page of the subreport (but not on the rest of the pages) if the subreport itself has multiple page.</p>
  
  <p>Actually what I want to do is to put a "Page x of n" variable in the subreport so the subreport can has its own set of page number. </p>
  
  <p><strong>This is the layout of my current report:</strong> (sorry I hv no permission uploading image here)</p>
  
  <hr>
  
  <p>Name: Amy (here is main report)</p>
  
  <hr>
  
  <p>page 1 of 2 (here is subreport)</p>
  
  <ol>
  <li>aaa</li>
  <li>bbb</li>
  <li>ccc
  <hr></li>
  </ol>
  
  <p><br /><br /><br /></p>
  
  <hr>
  
  <p>Name: Amy</p>
  
  <hr>
  
  <p>&lt;--- Page number missing (in fact, the entire Page-Header-Band disappear! That is, Page-Header-Band is not repeated on every page of the subreport) <br />
  1. eee <br />
  2. fff</p>
  
  <hr>
  
  <p><br /><br /><br /></p>
  
  <hr>
  
  <p>Name: Bob</p>
  
  <hr>
  
  <p>page 1 of 3</p>
  
  <ol>
  <li>ooo</li>
  <li>ppp</li>
  <li>qqq
  <hr></li>
  </ol>
  
  <p><br /><br /><br /></p>
  
  <hr>
  
  <p>Name: Bob</p>
  
  <hr>
  
  <ol>
  <li>rrr</li>
  <li>sss</li>
  <li>ttt
  <hr></li>
  </ol>
  
  <p><br /><br /><br /></p>
  
  <hr>
  
  <p>Name: Bob</p>
  
  <hr>
  
  <ol>
  <li>uuu</li>
  </ol>
  
  <hr>
  
  <p><br /><br /><br /><br /></p>
  
  <p><strong>The correct layout should be:</strong></p>
  
  <hr>
  
  <p>Name: Amy (here is main report)</p>
  
  <hr>
  
  <p>page 1 of 2 (here is subreport)</p>
  
  <ol>
  <li>aaa</li>
  <li>bbb</li>
  <li>ccc
  <hr></li>
  </ol>
  
  <p><br /><br /><br /></p>
  
  <hr>
  
  <p>Name: Amy</p>
  
  <hr>
  
  <p>page 2 of 2</p>
  
  <ol>
  <li>eee</li>
  <li>fff</li>
  </ol>
  
  <hr>
  
  <p><br /><br /><br /></p>
  
  <hr>
  
  <p>Name: Bob</p>
  
  <hr>
  
  <p>page 1 of 3</p>
  
  <ol>
  <li>ooo</li>
  <li>ppp</li>
  <li>qqq
  <hr></li>
  </ol>
  
  <p><br /><br /><br /></p>
  
  <hr>
  
  <p>Name: Bob</p>
  
  <hr>
  
  <p>page 2 of 3</p>
  
  <ol>
  <li>rrr</li>
  <li>sss</li>
  <li>ttt
  <hr></li>
  </ol>
  
  <p><br /><br /><br /></p>
  
  <hr>
  
  <p>Name: Bob</p>
  
  <hr>
  
  <p>page 3 of 3</p>
  
  <ol>
  <li>uuu</li>
  </ol>
  
  <hr>