title: How to set margins to jasper report in java?
body: <p>How to set margins to jasper report in java! </p>
  
  <p>I have reports.jasper with margins,but when print I must change margins!</p>
  
  <p><code>JasperPrint.setTopMargins(myMarginsValue)</code> doesn't work!!! </p>
  
  <p>I use <code>JRPrintServiceExporter</code> to send to the printer! </p>
  
  <p><strong>Current code:</strong></p>
  
  <pre><code>InputStream reportStream = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream("/rep‌​orts/" + "myReport"+".jasper"); 
  JasperReport template = (JasperReport) JRLoader.loadObject(reportStream);
  template.setWhenNoDataType(WhenNoDataTypeEnum.ALL_SECTIONS_NO_DETAIL);
  </code></pre>