title: JasperReport iReport: JRException: Error retrieving field value from bean
body: <p>I'm trying to understand how iReport works and how to create a simple jrxml file.
  The report has a title and header and the data should be in a table. When I try to check how the report looks like using the preview button, I could see the title and header but not the table (Please note that I use that I clicked the "Use default value"  for all fields). When I did not use the default value, I get this error.</p>
  
  <blockquote>
    <p>Error filling print... net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : name
    net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : name 
        at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:809) 
        at net.sf.jasperreports.components.table.fill.FillTableSubreport.prepareSubreport(FillTableSubreport.java:156) 
        at net.sf.jasperreports.components.table.fill.FillTable.prepare(FillTable.java:400) 
        at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare(JRFillComponentElement.java:151) 
    Caused by: net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : name 
        at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:123) 
        at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:96) 
        at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:109) 
    Caused by: java.lang.NoSuchMethodException: Unknown property 'name' on class 'class java.lang.String' 
        at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1322) 
        at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:770) 
        at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:846) 
        at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:426) 
        at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:111) 
        ... 15 more   Print not filled. Try to use an EmptyDataSource...</p>
  </blockquote>
  
  <p>I thought that maybe that problem has something to do with how I typed the data for List. Probably the format is wrong. This is how I typed the sample data </p>
  
  <blockquote>
    <p>(myName, 5, Manila)</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/daucR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/daucR.png" alt="enter image description here"></a>
  (Based on the screenshot, Is the format correct? I even tried enclosing it in a square bracket but I still get the same error.)</p>
  
  <p>please note that I have 3 columns Name , Age , Address.</p>
  
  <p>But in the error message I noticed this </p>
  
  <pre><code>Unknown property 'name' on class 'class java.lang.String' 
  </code></pre>
  
  <p>which makes me think that I did something wrong when I create the dataset. (Sorry if I used a wrong term).</p>
  
  <p>Anyway, here's the xml generated by iReport.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="firstReport" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="597c0716-df6b-42ec-a7c8-863eb1b7174a"&gt;
      &lt;style name="table"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="1.0" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table_TH" mode="Opaque" backcolor="#7FFFD4"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table_CH" mode="Opaque" backcolor="#BFFFEA"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table_TD" mode="Opaque" backcolor="#FFFFFF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 1"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="1.0" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 1_TH" mode="Opaque" backcolor="#7FFFD4"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 1_CH" mode="Opaque" backcolor="#BFFFEA"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;subDataset name="Table Dataset 2" uuid="208e382c-09df-484e-8d2d-a4eb4f4e48ba"&gt;
          &lt;field name="name" class="java.lang.String"/&gt;
          &lt;field name="age" class="java.lang.String"/&gt;
          &lt;field name="address" class="java.lang.String"/&gt;
      &lt;/subDataset&gt;
      &lt;parameter name="companyName" class="java.lang.String"/&gt;
      &lt;parameter name="date" class="java.util.Date"/&gt;
      &lt;parameter name="bean" class="java.util.List"/&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height="32" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="182" y="0" width="184" height="25" uuid="fe64d4b4-efb1-4ed2-ae06-772728fc8b65"/&gt;
                  &lt;textElement&gt;
                      &lt;font fontName="Bookman Old Style" size="15" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Chart Of Account List]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/title&gt;
      &lt;pageHeader&gt;
          &lt;band height="58" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="13" y="0" width="100" height="20" uuid="52ae4669-b47e-408c-aabc-e8f470a1d92b"/&gt;
                  &lt;text&gt;&lt;![CDATA[Company]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="13" y="38" width="100" height="20" uuid="a27fe0e1-9fe6-423f-a006-46c51c7e3e5e"/&gt;
                  &lt;text&gt;&lt;![CDATA[Date Exported]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField&gt;
                  &lt;reportElement x="113" y="0" width="100" height="20" uuid="1d600fa2-9de4-4999-9222-98a8bcb484f9"/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{companyName}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x="113" y="38" width="100" height="20" uuid="1147b818-90ae-4b41-a757-19a590db41d7"/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{date}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
          &lt;/band&gt;
      &lt;/pageHeader&gt;
      &lt;columnHeader&gt;
          &lt;band height="61" splitType="Stretch"/&gt;
      &lt;/columnHeader&gt;
      &lt;detail&gt;
          &lt;band height="125" splitType="Stretch"&gt;
              &lt;componentElement&gt;
                  &lt;reportElement key="table 1" style="table 1" x="13" y="0" width="270" height="50" uuid="652523bf-b666-47bc-a1aa-fc20fb9e489a"/&gt;
                  &lt;jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"&gt;
                      &lt;datasetRun subDataset="Table Dataset 2" uuid="6fcb9950-2d3f-4752-b56d-df7bff1e6991"&gt;
                          &lt;dataSourceExpression&gt;&lt;![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{bean})]]&gt;&lt;/dataSourceExpression&gt;
                      &lt;/datasetRun&gt;
                      &lt;jr:column width="90" uuid="ee62967c-3669-49fe-a70d-a588ae47439d"&gt;
                          &lt;jr:columnHeader style="table 1_CH" height="30" rowSpan="1"&gt;
                              &lt;staticText&gt;
                                  &lt;reportElement x="0" y="0" width="90" height="30" uuid="a0973bfe-815a-498e-8b25-c3320cfe0f62"/&gt;
                                  &lt;text&gt;&lt;![CDATA[Name]]&gt;&lt;/text&gt;
                              &lt;/staticText&gt;
                          &lt;/jr:columnHeader&gt;
                          &lt;jr:detailCell style="table 1_TD" height="20" rowSpan="1"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement x="0" y="0" width="90" height="20" uuid="61d8309e-dd7d-4978-b171-9ae9144e2f5c"/&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{name}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:detailCell&gt;
                      &lt;/jr:column&gt;
                      &lt;jr:column width="90" uuid="76a9e313-d134-420e-898b-7f5f444c4efb"&gt;
                          &lt;jr:columnHeader style="table 1_CH" height="30" rowSpan="1"&gt;
                              &lt;staticText&gt;
                                  &lt;reportElement x="0" y="0" width="90" height="30" uuid="f79fdf71-a673-4d3a-8e10-b986d99b8e9b"/&gt;
                                  &lt;text&gt;&lt;![CDATA[Age]]&gt;&lt;/text&gt;
                              &lt;/staticText&gt;
                          &lt;/jr:columnHeader&gt;
                          &lt;jr:detailCell style="table 1_TD" height="20" rowSpan="1"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement x="0" y="0" width="90" height="20" uuid="e4342bed-af9c-4541-9e57-a24485d0a94d"/&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{age}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:detailCell&gt;
                      &lt;/jr:column&gt;
                      &lt;jr:column width="90" uuid="5c38c250-d74e-440c-93cb-3fef8ad38157"&gt;
                          &lt;jr:columnHeader style="table 1_CH" height="30" rowSpan="1"&gt;
                              &lt;staticText&gt;
                                  &lt;reportElement x="0" y="0" width="90" height="30" uuid="4656a074-f345-483a-971b-b00c95746ec0"/&gt;
                                  &lt;text&gt;&lt;![CDATA[Address]]&gt;&lt;/text&gt;
                              &lt;/staticText&gt;
                          &lt;/jr:columnHeader&gt;
                          &lt;jr:detailCell style="table 1_TD" height="20" rowSpan="1"&gt;
                              &lt;textField&gt;
                                  &lt;reportElement x="0" y="0" width="90" height="20" uuid="f2cc3d1c-97ef-48c1-b6e4-a12acc4e67ad"/&gt;
                                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{address}]]&gt;&lt;/textFieldExpression&gt;
                              &lt;/textField&gt;
                          &lt;/jr:detailCell&gt;
                      &lt;/jr:column&gt;
                  &lt;/jr:table&gt;
              &lt;/componentElement&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>1) What is wrong with the jrxml that I made? Did I supply a wrong formatted data to the table? Or there's just something wrong with how I did the report?</p>