private void report(String action) { if (report == null) { return; } BeanJasperReport jasperreport = new BeanJasperReport(); List<AccountsReport> list = new ArrayList<>(); list.add(report); jasperreport.accountStatement(list, action); }
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