title: JasperReports won't replace $R{} when internationalizing report
body: <p>I need to produce i18n reports with existing code using JasperReports (4.7.1 originally but same problem with 5.6.1).
  I did the following:</p>
  
  <ol>
  <li>Report name is: x_report.jrxml</li>
  <li>Added attribute resourceBundle="x_report" to the jasperReport tag in the jrxml file</li>
  <li>Replaced text with $R{} tags in jrxml file</li>
  <li>Built file</li>
  </ol>
  
  <p>Added JRParameter.REPORT_LOCALE and JRParameter.REPORT_RESOURCE_BUNDLE to the parameters to pass to the JasperFillManager:</p>
  
  <pre><code>    File reportFile = new File(getClass().getResource("/reports").getFile(), report.getReportFileName());
      Map&lt;String, Object&gt; fillParams = (Map&lt;String, Object&gt;) report.getFillParameters();
      java.util.Locale locale = new java.util.Locale("it");
      fillParams.put(JRParameter.REPORT_LOCALE, locale);
      String resBundleName = ...
      ResourceBundle resBundle = ResourceBundle.getBundle(resBundleName, locale);
      fillParams.put(JRParameter.REPORT_RESOURCE_BUNDLE, resBundle);
      ...
  </code></pre>
  
  <p>The JasperFillManager getting the params (with locale and resource bundle) and the report path:</p>
  
  <pre><code>    BeanReport report = (BeanReport) this.report;
      Collection&lt;?&gt; beans = report.getBeans();
      JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(beans);
      JasperPrint print = JasperFillManager.fillReport(reportFile.getPath(), fillParams, ds);
      ...
  
      if (httpSession != null) {
          httpSession.setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, print);
          exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "ReportImage?image=");
      }
  </code></pre>
  
  <p>exporter is a JRExporter:</p>
  
  <pre><code>    exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
      exporter.setParameter(JRExporterParameter.CHARACTER_ENCODING, "UTF-8");
      exporter.exportReport();
  </code></pre>
  
  <p>The resource bundle is found but my generated report still has the $R{} tags instead of the localized text.</p>
  
  <p>What could be missing?</p>
  
  <p>Thank you for your help!</p>