title: How Vector<Vector> Receipt used as JasperReports DataSource with Java?
body: <p>I have a Vector receiptOrder and I want to print that receipt to thermal printer using <code>iReport</code>.</p>
  
  <p>I get 3 classes:</p>
  
  <ul>
  <li><p><em>MyDataSource</em> which implements <em>JRDataSource</em></p></li>
  <li><p><em>MyDataSourceProvider</em> which implements <em>JRDataSourceProvider</em></p></li>
  <li><p><em>JRBasicField</em> which implements <em>JRField</em></p></li>
  </ul>
  
  <p>How I can setup the <code>JasperReports</code> datasource with that vector?</p>
  
  <ul>
  <li><p>i made this changes .</p>
  
  <ul>
  <li><p>load <code>jrxml</code> file </p>
  
  <pre>
  JasperDesign jasperDesign = JRXmlLoader.load("c:/PrintReceipt.jrxml");
  JasperReport jr = JasperCompileManager.compileReport(jasperDesign);
  </pre></li>
  <li><p>pass <code>orderRows</code> which is <code>Vector&lt;Vector&gt;</code> to <code>MyDataSourceProvider</code> then Create <code>datasource</code> </p>
  
  <pre>
  JRDataSourceProvider dsp = new MyDataSourceProvider(orderRows);
  JRDataSource dataSource = dsp.create(jr);
  JasperPrint jasperPrint = JasperFillManager.fillReport(jr, new HashMap(), dataSource);
  JasperExportManager.exportReportToPdfFile(jasperPrint, "c:/test.pdf");
  JasperViewer.viewReport(jasperPrint);
  </pre></li>
  </ul></li>
  <li><p>but JasperReport show me empty view and also <code>test.pdf</code> is empty .</p></li>
  <li><p>any idea ...?</p></li>
  </ul>