public ActionResult NorthTowerrptExcel()
        {
            NorthTowerrptEntity obj;
            //ReportClass rptH = new ReportClass();
            ReportDocument rpt = new ReportDocument();
            ArrayList al = new ArrayList();
            //rptH.FileName = Server.MapPath("/Reports/Northtowercal.rpt");
            //rptH.Load();
            rpt.Load(Server.MapPath("~/Reports/Northtowercal.rpt"));

            List<NorthTowerdaycal> ItemList = (List<NorthTowerdaycal>)Session["NTR"];

            foreach (NorthTowerdaycal dr in ItemList)
            {
                obj = new NorthTowerrptEntity();

                obj.EMPID = dr.EMPID;
                obj.ENAME = dr.ENAME;
                obj.SECTION = dr.SECTION;
                obj.JDate = dr.JDate;
                obj.Status = dr.Status;
                obj.TTDay = dr.TTDay;
                obj.Holiday = dr.Holiday;
                obj.Present = dr.Present;
                obj.Absent = dr.Absent;
                obj.CL = dr.CL;
                obj.SL = dr.SL;
                obj.ML = dr.ML;
                obj.EL = dr.EL;

                al.Add(obj);
            }

            rpt.SetDataSource(al);
            MemoryStream stream = (MemoryStream)rpt.ExportToStream(ExportFormatType.Excel);
            return File(stream, "application/octet-stream", "NorthTowerSummary.xls");
        }
        public ActionResult NorthTowerrpt()
        {
            NorthTowerrptEntity obj;
            //ReportClass rptH = new ReportClass();
            ReportDocument rpt = new ReportDocument();
            ArrayList al = new ArrayList();
            //rptH.FileName = Server.MapPath("/Reports/Northtowercal.rpt");
            //rptH.Load();
            rpt.Load(Server.MapPath("~/Reports/Northtowercal.rpt"));

            List<NorthTowerdaycal> ItemList = (List<NorthTowerdaycal>)Session["NTR"];

            foreach (NorthTowerdaycal dr in ItemList)
            {
                obj = new NorthTowerrptEntity();

                obj.EMPID = dr.EMPID;
                obj.ENAME = dr.ENAME;
                obj.Designation = dr.Designation;
                obj.SECTION = dr.SECTION;
                obj.JDate = dr.JDate;
                obj.Status = dr.Status;
                obj.TTDay = dr.TTDay;
                obj.Holiday = dr.Holiday;
                obj.Present = dr.Present;
                obj.Absent = dr.Absent;
                obj.CL = dr.CL;
                obj.SL = dr.SL;
                obj.ML = dr.ML;
                obj.EL = dr.EL;

                al.Add(obj);
            }

            rpt.SetDataSource(al);
            //MemoryStream stream=rptH.ExportToHttpResponse(ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, false, "crReport");
            MemoryStream stream = (MemoryStream)rpt.ExportToStream(ExportFormatType.PortableDocFormat);
            return File(stream, "application/pdf");
            //return File(stream, "applicaton/vnd.ms-excel");
            // return File(stream, "application/octet-stream", "mytestfile.xls");
        }