title: Jasper report preview shows data in field but while generating report through java it prints NULL
body: <p>Jasperreport successfully generated (JAsperTest.pdf ) with below exception but It didn't print any integer values in ID field. It prints only NULL in ID field. But preview in jasper tool shows all integer values in ID field and not in report generated through java code.</p>
  
  <pre><code>"PM net.sf.jasperreports.engine.export.PdfGlyphRenderer determinePatchedItext
  WARNING: Unpatched iText found, cannot use glyph rendering"
  </code></pre>
  
  <p>This question was asked in other forum but no solution found. Please help me with the solution. I tried removing itext5.5.0 jar to itext 7 jar but which resulted in error.</p>
  
  <p>Jar files included in lib folder : <a href="https://imgur.com/lHZR60t" rel="nofollow noreferrer">https://imgur.com/lHZR60t</a></p>
  
  <p>JasperTest.java</p>
  
  <pre><code>import java.io.File;
      import java.io.IOException;
      import java.util.HashMap;
      import java.util.Map;
  
      import net.sf.jasperreports.engine.JRDataSource;
      import net.sf.jasperreports.engine.JREmptyDataSource;
      import net.sf.jasperreports.engine.JRException;
      import net.sf.jasperreports.engine.JasperCompileManager;
      import net.sf.jasperreports.engine.JasperExportManager;
      import net.sf.jasperreports.engine.JasperFillManager;
      import net.sf.jasperreports.engine.JasperPrint;
      import net.sf.jasperreports.engine.JasperReport;
      public class JasperClass {
  
         public static void main(String[] args) throws JRException, IOException {
  
              // Compile jrxml file.
             JasperReport jasperReport = JasperCompileManager
                     .compileReport("C:/repo/JasperTest/Jaspertest.jrxml");
  
             // Parameters for report
             Map&lt;String, Object&gt; parameters = new HashMap&lt;String, Object&gt;();
  
             // DataSource
             // This is simple example, no database.
             // then using empty datasource.
             JRDataSource dataSource = new JREmptyDataSource();
  
             JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,
                     parameters, dataSource);
  
  
             // Make sure the output directory exists.
             File outDir = new File("C:/repo/JasperTest");
             outDir.mkdirs();
  
             // Export to PDF.
             JasperExportManager.exportReportToPdfFile(jasperPrint,
                     "C:/repo/JasperTest/Jaspertest.pdf");
  
             System.out.println("Done!");
         }
      }
  </code></pre>
  
  <p>JasperTest.jrxml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1  --&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="Jaspertest" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="98c6f0de-1e25-4ff3-b982-cfa45f54b507"&gt;
      &lt;property name="com.jaspersoft.studio.data.sql.tables" value="Y2l0eSAsMTUsMTUsMTFlZThiNTgtMzM2OC00ZmQ3LWEzOTYtY2ZhMTM4MzllMjZhOw=="/&gt;
      &lt;property name="com.jaspersoft.studio.data.defaultdataadapter" value="Dataadaptertest.xml"/&gt;
      &lt;queryString language="SQL"&gt;
          &lt;![CDATA[SELECT ID
  FROM city]]&gt;
      &lt;/queryString&gt;
      &lt;field name="ID" class="java.lang.Integer"/&gt;
      &lt;group name="ID"&gt;
          &lt;groupExpression&gt;&lt;![CDATA[$F{ID}]]&gt;&lt;/groupExpression&gt;
      &lt;/group&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height="75" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="100" y="10" width="100" height="30" uuid="fe0a9fb7-deef-4393-a835-7cf9e41b8bef"/&gt;
                  &lt;text&gt;&lt;![CDATA[Test Successfull]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/title&gt;
      &lt;columnHeader&gt;
          &lt;band height="63" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="89" y="33" width="100" height="30" uuid="c2a5e228-a3f1-42fc-8064-688191cb7633"/&gt;
                  &lt;text&gt;&lt;![CDATA[ID]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/columnHeader&gt;
      &lt;detail&gt;
          &lt;band height="46" splitType="Stretch"&gt;
              &lt;textField&gt;
                  &lt;reportElement x="89" y="10" width="100" height="30" uuid="126f1743-5bae-4e84-8bc6-9b36c2a808cc"/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{ID}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
  &lt;/jasperReport&gt;
  </code></pre>