+
+ private void buttonApplyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonApplyActionPerformed
+ // TODO add your handling code here:
+ if (! checkFilterByClient.isSelected()) {
+ 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.getReportData(currentReport, selid);
+ if (reportData != null)
+ populateReport();
+ }
+
+ }//GEN-LAST:event_buttonApplyActionPerformed
+
+ private void menuExportHTMLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuExportHTMLActionPerformed
+ // TODO add your handling code here:
+ JFileChooser chooser = new JFileChooser ();
+ FileNameExtensionFilter flt = new FileNameExtensionFilter("Hypertext Markup File (.html)", "html");
+ chooser.setFileFilter(flt);
+ int rt = chooser.showSaveDialog(this);
+ if (rt == JFileChooser.APPROVE_OPTION) {
+ String filepath = chooser.getSelectedFile().getAbsolutePath();
+ if (! (filepath.endsWith(".html") || filepath.endsWith(".htm")) )
+ filepath = filepath.concat(".html");
+ boolean ret= Utility.saveReportHTML (filepath, reportTitle, reportCols, reportData);
+ if (ret == false)
+ JOptionPane.showMessageDialog (this, ERROR_SAVING_REPORT);
+ else
+ JOptionPane.showMessageDialog(this, REPORT_SAVED_SUCCESSFULLY);
+
+ }
+ }//GEN-LAST:event_menuExportHTMLActionPerformed