public ActionResult ManagerDeptrpt()
        {
            ManagerinforptEntity obj;

            ReportClass rptH = new ReportClass();
            ArrayList al = new ArrayList();
            rptH.FileName = Server.MapPath("/Reports/MGRDeptrpt.rpt");
            rptH.Load();

            List<ManagerinfoEntity> ItemList = (List<ManagerinfoEntity>)Session["MGRDept"];

            foreach (ManagerinfoEntity dr in ItemList)
            {
                obj = new ManagerinforptEntity();

                obj.PDate = dr.PDate;
                obj.EMPID = dr.EMPID;
                obj.EName = dr.EName;
                obj.Designation = dr.Designation;
                obj.DeptName = dr.DeptName;
                obj.Intime = dr.Intime;
                obj.Outtime = dr.Outtime;
                obj.Status = dr.Status;
                al.Add(obj);
            }

            rptH.SetDataSource(al);
            MemoryStream stream = (MemoryStream)rptH.ExportToStream(ExportFormatType.PortableDocFormat);
            return File(stream, "application/pdf");
        }
        public ActionResult AllManagerInforptExcel()
        {
            ManagerinforptEntity obj;
            ReportClass rptH = new ReportClass();
            ArrayList al = new ArrayList();
            rptH.FileName = Server.MapPath("/Reports/AllManagerInforpt.rpt");
            rptH.Load();

            List<ManagerinfoEntity> ItemList = (List<ManagerinfoEntity>)Session["INDMGR"];

            foreach (ManagerinfoEntity dr in ItemList)
            {
                obj = new ManagerinforptEntity();

                obj.PDate = dr.PDate;
                obj.EMPID = dr.EMPID;
                obj.EName = dr.EName;
                obj.Designation = dr.Designation;
                obj.DeptName = dr.DeptName;
                obj.Intime = dr.Intime;
                obj.Outtime = dr.Outtime;
                obj.Status = dr.Status;
                al.Add(obj);
            }

            rptH.SetDataSource(al);
            MemoryStream stream = (MemoryStream)rptH.ExportToStream(ExportFormatType.Excel);   //For Excel File
            return File(stream, "application/octet-stream", "ManagerInfo.xls");    //For Excel with File Name
        }