private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try {
con = DbConnection.getConnection();
JasperDesign jasperDesign = JRXmlLoader.load("outstanding.jrxml");
String sql = "Select id, cust_name, day, location, total, advance, outstanding from atharwa.project where id='" + txtcheck.getText() + "' ";
JRDesignQuery newQuery = new JRDesignQuery();
newQuery.setText(sql);
jasperDesign.setQuery(newQuery);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, null, con);
JasperViewer.viewReport(jasperPrint);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
}
}