title: How to set TableModel as DataSource in an empty iReport (NetBeans 7.1)
body: <p>This is my first time to create a report using <code>iReport</code> plugin in <code>Netbeans 7.1</code>. I have all the records that I need (<em>records were stored in a <strong>TableModel</em></strong>) and I want it to set as the <code>datasource</code> to an empty report.</p>
  
  <p>Here's what I did so far:</p>
  
  <blockquote>
    <p>1.)  I have a <strong>TableModel</strong> from a <strong>ResultSet</strong>. (fields: <em>StudentID, FullName, SectionName</em>)</p>
  </blockquote>
  
  <pre><code>        private TableModel ConvertResultSetToTableModel(ResultSet rs)
          {
               TableModel tb;
               ... // codes here
               return tb;
          }
  </code></pre>
  
  <blockquote>
    <p>2.) I added an <strong>EmptyReport</strong> on my project. <em>The reason why it's empty is because I do not want iReport to connect to my database server.</em></p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/IonfR.jpg" alt="Adding Empty Report"></p>
  
  <blockquote>
    <p>3.) This is my sample report (<em>no elegant design yet</em>). How can I <strong>bind or fill the fields</strong> of the TableModel (fields: <em>StudentID, FullName, SectionName</em>) to the <strong>TextField</strong> of the iReport (<strong><em>$F{StudentID}, $F{FullName}, $F{SectionName}</em></strong>)? And how can I also directly set the <strong><em>$F{CourseName}</em></strong> TextField from a local string variable?</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/RQoSm.jpg" alt="Sample Report"></p>
  
  <p>I hope I made everything clear here. Please help. Thank you.</p>