private void btnGenerateReportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGenerateReportActionPerformed
        
        JFileChooser newChooser = new JFileChooser();
        int chooserResult = newChooser.showSaveDialog(this); 
        
        switch(chooserResult) {
            case JFileChooser.CANCEL_OPTION :
                break;
            case JFileChooser.APPROVE_OPTION :
                File file = new File(newChooser.getSelectedFile().getAbsolutePath() + ".csv");
                if (!file.exists()) {
                    xml.createReport(file);
                }
                else {
                    int overwrite = JOptionPane.showConfirmDialog(null, "This file already exists. \n Do you want to overwrite this file? ", "Warning", JOptionPane.WARNING_MESSAGE);
                    switch(overwrite) {
                        case JOptionPane.YES_OPTION :
                            xml.createReport(file);
                            break;                       
                    }
                }
                break;
            case JFileChooser.ERROR_OPTION :
                JOptionPane.showMessageDialog(null, "Something went wrong.", "Error", JOptionPane.ERROR_MESSAGE);
                break;
        }      
    }//GEN-LAST:event_btnGenerateReportActionPerformed