X-Git-Url: https://harishankar.org/repos/?p=habeas.git;a=blobdiff_plain;f=src%2Fhabeas%2FNoticesReportViewDialog.java;fp=src%2Fhabeas%2FNoticesReportViewDialog.java;h=f9d7a8fcfdcf36bf1f4f0a85aebc1f85fb1c705a;hp=64f5536c580d61bab9668f0297db2c876d90f1f0;hb=020bf95644b2f26d9c81d66d2a752e55bcd3ad5b;hpb=06a2c4c692e08fdc860e489c86f34b2fe64696d1 diff --git a/src/habeas/NoticesReportViewDialog.java b/src/habeas/NoticesReportViewDialog.java index 64f5536..f9d7a8f 100644 --- a/src/habeas/NoticesReportViewDialog.java +++ b/src/habeas/NoticesReportViewDialog.java @@ -8,11 +8,9 @@ package habeas; import java.util.ArrayList; import javax.swing.JFileChooser; import javax.swing.JOptionPane; -import javax.swing.JTable; import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileNameExtensionFilter; import javax.swing.table.DefaultTableModel; -import javax.swing.table.TableModel; /** * @@ -20,6 +18,7 @@ import javax.swing.table.TableModel; */ public class NoticesReportViewDialog extends javax.swing.JDialog { + private int currentReport; private String reportTitle; private String[] reportCols; private ArrayList reportData; @@ -144,15 +143,16 @@ public class NoticesReportViewDialog extends javax.swing.JDialog { private void buttonApplyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonApplyActionPerformed // TODO add your handling code here: if (! checkFilterByClient.isSelected()) { - reportData = Utility.getPendingPaymentBills(-1); - if (reportData != null) + reportData = Utility.getReportData(currentReport, -1); + + if (reportData != null) populateReport(); } else { DBItem db = (DBItem)comboClients.getSelectedItem(); if (db == null) return; int selid = db.getKey(); - reportData = Utility.getPendingPaymentBills(selid); + reportData = Utility.getReportData(currentReport, selid); if (reportData != null) populateReport(); } @@ -214,8 +214,9 @@ public class NoticesReportViewDialog extends javax.swing.JDialog { private javax.swing.JTable tableReport; // End of variables declaration//GEN-END:variables - public void setupReportTable(String title, String[] columns, + public void setupReportTable(int reportNum, String title, String[] columns, ArrayList data) { + currentReport = reportNum; reportTitle = title; reportCols = columns; reportData = data;