// Path: Server Client/src/reports/DataBean.java
// public class DataBean {
//         private String name;
//         private String stu_id;
//         private String percentage;
//        
//         public void setName(String name) {
//                 this.name = name;
//         }
//        
//         public String getName() {
//                 return name;
//         }
// 
//         public void setPercentage(String occupation) {
//                 this.percentage = occupation;
//         }
// 
//         public String getPercentage() {
//                 return this.percentage;
//         }
// 
//         public void setStu_id(String place) {
//                 this.stu_id = place;
//         }
// 
//         public String getStu_id() {
//                 return this.stu_id;
//         }
// 
//         
// }
// 
// Path: Pre_FRAMS/src/reports/DataBeanMaker.java
// public class DataBeanMaker {
//         public ArrayList<DataBean> getDataBeanList(ResultSet rs) {
//                 ArrayList<DataBean> dataBeanList = new ArrayList<DataBean>();
//                
// //                //dataBeanList.add(produce("Babji, Chetty", "Engineer", "Nuremberg", "Germany"));
// //                dataBeanList.add(produce("Albert Einstein", "Engineer", "Ulm"));
// //                dataBeanList.add(produce("Alfred Hitchcock", "Movie Director", "London"));
// //                dataBeanList.add(produce("Wernher Von Braun", "Rocket Scientist", "Wyrzysk"));
// //                dataBeanList.add(produce("Sigmund Freud", "Neurologist", "Pribor"));
// //                dataBeanList.add(produce("Mahatma Gandhi", "Lawyer", "Gujarat"));
// //                dataBeanList.add(produce("Sachin Tendulkar", "Cricket Player","Mumbai"));
// //                dataBeanList.add(produce("Michael Schumacher", "F1 Racer", "Cologne"));
//                 try {
//                 while(rs.next())
//                 {
//                     //CustomBean cb=new CustomBean
//                             System.out.println(rs.getString(1)+","+rs.getString(2)+","+rs.getString(3));
//                             dataBeanList.add(produce(rs.getString(1),rs.getString(2),rs.getString(3)));
//                     //ds_list.add(cb);
//                     
//                 }
//             } catch (SQLException ex) {
// //                Logger.getLogger(Faculty_Home.class.getName()).log(Level.SEVERE, null, ex);
//             }
//                
//                 return dataBeanList;
//         }
//        
//         private DataBean produce(String place,String name, String occupation) {
//                 DataBean dataBean = new DataBean();
//                
//                 dataBean.setName(name);
//                 dataBean.setPercentage(occupation);
//                 dataBean.setStu_id(place);
//                 //dataBean.setCountry(country);
//                
//                 return dataBean;
//         }
// }


import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.sql.rowset.CachedRowSet;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRResultSetDataSource;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
import net.sf.jasperreports.swing.JRViewer;
import reports.DataBean;
import reports.DataBeanMaker;
            {
            jv.removeAll();
            panel_report.removeAll();
            SwingUtilities.updateComponentTreeUI(jv);
            SwingUtilities.updateComponentTreeUI(panel_report);
            oos.writeObject("ReportGen");
            oos.writeObject(facid);
            oos.writeObject(facname);
            oos.writeObject(cmb_dept.getSelectedItem());
            oos.writeObject(cmb_sem.getSelectedItem());
            oos.writeObject(cmb_div.getSelectedItem());
            oos.writeObject(cmb_sub.getSelectedItem());
            oos.writeObject(date_start.getDate().toString());
            oos.writeObject(date_end.getDate().toString());
            CachedRowSet rs=(CachedRowSet) ois.readObject();
            //System.out.println("ResultSet goit....");

        HashMap m=new HashMap();
        
              m.put("dept_name",cmb_dept.getSelectedItem());
              m.put("semester",cmb_sem.getSelectedItem());
             m.put("division",cmb_div.getSelectedItem());
             //m.put("SubDataSource",jrds);
             //m.put("REPORT_DATA_SOURCE",jrds);
             m.put("subject",cmb_sub.getSelectedItem());
             m.put("faculty",facname);
             m.put("s_date",df.format(date_start.getDate()));
             m.put("e_date",df.format(date_end.getDate()));
               InputStream inputStream = getClass().getResourceAsStream("/reports/test_jasper.jrxml");
               
// Path: Server Client/src/reports/DataBean.java
// public class DataBean {
//         private String name;
//         private String stu_id;
//         private String percentage;
//        
//         public void setName(String name) {
//                 this.name = name;
//         }
//        
//         public String getName() {
//                 return name;
//         }
// 
//         public void setPercentage(String occupation) {
//                 this.percentage = occupation;
//         }
// 
//         public String getPercentage() {
//                 return this.percentage;
//         }
// 
//         public void setStu_id(String place) {
//                 this.stu_id = place;
//         }
// 
//         public String getStu_id() {
//                 return this.stu_id;
//         }
// 
//         
// }
// 
// Path: Pre_FRAMS/src/reports/DataBeanMaker.java
// public class DataBeanMaker {
//         public ArrayList<DataBean> getDataBeanList(ResultSet rs) {
//                 ArrayList<DataBean> dataBeanList = new ArrayList<DataBean>();
//                
// //                //dataBeanList.add(produce("Babji, Chetty", "Engineer", "Nuremberg", "Germany"));
// //                dataBeanList.add(produce("Albert Einstein", "Engineer", "Ulm"));
// //                dataBeanList.add(produce("Alfred Hitchcock", "Movie Director", "London"));
// //                dataBeanList.add(produce("Wernher Von Braun", "Rocket Scientist", "Wyrzysk"));
// //                dataBeanList.add(produce("Sigmund Freud", "Neurologist", "Pribor"));
// //                dataBeanList.add(produce("Mahatma Gandhi", "Lawyer", "Gujarat"));
// //                dataBeanList.add(produce("Sachin Tendulkar", "Cricket Player","Mumbai"));
// //                dataBeanList.add(produce("Michael Schumacher", "F1 Racer", "Cologne"));
//                 try {
//                 while(rs.next())
//                 {
//                     //CustomBean cb=new CustomBean
//                             System.out.println(rs.getString(1)+","+rs.getString(2)+","+rs.getString(3));
//                             dataBeanList.add(produce(rs.getString(1),rs.getString(2),rs.getString(3)));
//                     //ds_list.add(cb);
//                     
//                 }
//             } catch (SQLException ex) {
// //                Logger.getLogger(Faculty_Home.class.getName()).log(Level.SEVERE, null, ex);
//             }
//                
//                 return dataBeanList;
//         }
//        
//         private DataBean produce(String place,String name, String occupation) {
//                 DataBean dataBean = new DataBean();
//                
//                 dataBean.setName(name);
//                 dataBean.setPercentage(occupation);
//                 dataBean.setStu_id(place);
//                 //dataBean.setCountry(country);
//                
//                 return dataBean;
//         }
// }


// Path: Server Client/src/Server_Client/Faculty_Home.java
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.sql.rowset.CachedRowSet;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRResultSetDataSource;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
import net.sf.jasperreports.swing.JRViewer;
import reports.DataBean;
import reports.DataBeanMaker;

            {
            jv.removeAll();
            panel_report.removeAll();
            SwingUtilities.updateComponentTreeUI(jv);
            SwingUtilities.updateComponentTreeUI(panel_report);
            oos.writeObject("ReportGen");
            oos.writeObject(facid);
            oos.writeObject(facname);
            oos.writeObject(cmb_dept.getSelectedItem());
            oos.writeObject(cmb_sem.getSelectedItem());
            oos.writeObject(cmb_div.getSelectedItem());
            oos.writeObject(cmb_sub.getSelectedItem());
            oos.writeObject(date_start.getDate().toString());
            oos.writeObject(date_end.getDate().toString());
            CachedRowSet rs=(CachedRowSet) ois.readObject();
            //System.out.println("ResultSet goit....");

        HashMap m=new HashMap();
        
              m.put("dept_name",cmb_dept.getSelectedItem());
              m.put("semester",cmb_sem.getSelectedItem());
             m.put("division",cmb_div.getSelectedItem());
             //m.put("SubDataSource",jrds);
             //m.put("REPORT_DATA_SOURCE",jrds);
             m.put("subject",cmb_sub.getSelectedItem());
             m.put("faculty",facname);
             m.put("s_date",df.format(date_start.getDate()));
             m.put("e_date",df.format(date_end.getDate()));
               InputStream inputStream = getClass().getResourceAsStream("/reports/test_jasper.jrxml");
               
                DataBeanMaker dataBeanMaker = new DataBeanMaker();