btn4jRefresh.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
if (jListUserReports.isSelectionEmpty() == false)
{
JDBUserReport reportid = (JDBUserReport) ((JDBListData) jListUserReports.getSelectedValue()).getObject();
populateListUserReports(reportid.getReportID());
} else
{
populateListUserReports("");
}
}
});
btn4jRefresh.setText(lang.get("btn_Refresh"));
btn4jRefresh.setMnemonic('0');
btn4jRun.setBounds(20, 156, 126, 29);
panelButtons.add(btn4jRun);
btn4jRun.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0)
{
if (jListUserReports.isSelectionEmpty() == false)
{
JDBUserReport reportid = (JDBUserReport) ((JDBListData) jListUserReports.getSelectedValue()).getObject();
reportid.getUserReportProperties();
if (reportid.isParamDateRequired())
{
reportid.setParamFromDate(JUtility.getTimestampFromDate(domDateFrom.getDate()));
reportid.setParamToDate(JUtility.getTimestampFromDate(domDateTo.getDate()));
}
label4j_statusBar.setText("Please wait....");
if (reportid.runReport() == false)
{
JUtility.errorBeep();
label4j_statusBar.setText(reportid.getErrorMessage());
JOptionPane.showMessageDialog(Common.mainForm, reportid.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE,Common.icon_confirm);
} else
{
label4j_statusBar.setText("Created : " + reportid.getExportFilename());
}
}
}
});
btn4jRun.setText(lang.get("btn_Run"));