private void populateSummery(AccountsReport r) {
   lblInvAmount.setText(r.getTotalInvAmount());
   lblCMemo.setText(r.getTotalCMAmount());
   lblDMemo.setText(r.getTotalDMAmount());
   lblPayment.setText(r.getTotalPayment());
   lblRefund.setText(r.getTotalRefund());
 }
 // End of variables declaration//GEN-END:variables
 @Override
 public void propertyChange(PropertyChangeEvent evt) {
   if ("progress".equals(evt.getPropertyName())) {
     int progress = (Integer) evt.getNewValue();
     progressBar.setValue(progress);
     if (progress == 100) {
       try {
         report = task.get();
         report.addFirstLine();
         report.addLastLine();
         lines = report.getLines();
         populateTable();
       } catch (InterruptedException | ExecutionException ex) {
         Logger.getLogger(TSalesInvoiceReportingFrame.class.getName()).log(Level.SEVERE, null, ex);
       } finally {
         btnSearch.setEnabled(true);
       }
     }
   }
 }
  private void btnEmailActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnEmailActionPerformed
    if (report == null) {
      return;
    }

    String receipent = report.getEmail();
    String subject =
        report.getReportTitle().concat(" From").concat(Application.getMainAgent().getName());
    String body =
        report.getReportTitle().concat(" From").concat(Application.getMainAgent().getName());
    String refference = "report";
    if (receipent != null) {
      BeanJasperReport jasperreport = new BeanJasperReport(receipent, subject, body, refference);
      List<AccountsReport> list = new ArrayList<>();
      list.add(report);
      jasperreport.accountStatement(list, "EMAIL");
    } else {
      JOptionPane.showMessageDialog(null, "No Email address", "Email", JOptionPane.WARNING_MESSAGE);
    }
  } // GEN-LAST:event_btnEmailActionPerformed