i am creating jasper report for view the student details. i have a textfield if the enter correct student id relavent student details display on the jsper report below. i called the jsper report inside the jpanel.
if i enter first time student id 3 it displayed result success then if i enter the second time student id 4 the same result shown. i don't know why.
HashMap a = new HashMap();
a.put("id", txtno.getText());
try {
JasperDesign jdesign = JRXmlLoader.load("C:\\Users\\kobinath\\Documents\\NetBeansProjects\\JavaApplication138\\src\\report1.jrxml");
JasperReport jreport = JasperCompileManager.compileReport(jdesign);
JasperPrint jprint = JasperFillManager.fillReport(jreport, a, con);
// JasperViewer.viewReport(jprint);
JRViewer vw=new JRViewer(jprint);
jPanel1.setLayout(new BorderLayout());
jPanel1.repaint();
jPanel1.add(vw);
jPanel1.revalidate();
} catch (JRException ex) {
}