title: How to show the content of a List in JasperReports
body: <p>I have a <em>Collection</em> of type <em>List</em> that I want to pass it to a report using <em>JasperReports</em> and <em>iReport</em> on <em>NetBeans</em>, but I can't manage to show the content of the list on the Report.<br />
  I don't know how to show the data in the <strong><em>Details</em></strong> section of the jrxml. What parameter should I use?<br />
  The list has Objects of type <code>Proveedor</code> (Provider in Spanish) and has variables like name, code, etc.<br />
  Here is the code of the method who call to <em>JasperReports</em>:</p>
  
  <pre class="lang-java prettyprint-override"><code>public void generateReport(List&lt;Proveedor&gt; aList){
      String reportName = System.getProperty("user.dir") + "\\src\\reports\\lista-proveedores.jrxml";
      JRBeanCollectionDataSource dataSource;
      JasperReport jasperReport;
      JasperPrint jasperPrint;
  
      try{
          //1-I fill the dataSource with the Collection
          dataSource = new JRBeanCollectionDataSource(aList);
  
          //2-Compile the XML
          jasperReport = JasperCompileManager.compileReport(reportName);
  
          //3-Fill the report with the datasource
          jasperPrint = JasperFillManager.fillReport(jasperReport, null, dataSource);
  
          //4-Export to PDF and save to disk
          JasperExportManager.exportReportToPdfFile(jasperPrint, "Proveedores.pdf");
  
          System.out.println("Finished!");
  
      }catch (Exception e){
          System.out.println(e);
          //e.printStackTrace();
      }
  }
  </code></pre>