public ActionResult GenerateReport5()
        {
            DB50Entities db = new DB50Entities();

            var            c = db.Report5();
            CrystalReport5 r = new CrystalReport5();

            r.Load();

            Stream s = r.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

            return(File(s, "application/pdf"));
        }
        /// <summary>
        /// Download PDF of loan's installments
        /// </summary>
        /// <returns></returns>
        public ActionResult ExportLoanInstallments()
        {
            List <Installement> allCustomer = new List <Installement>();

            allCustomer = db.Installements.ToList();


            CrystalReport5 rd = new CrystalReport5();

            rd.Load(Path.Combine(Server.MapPath("~/CrystalReports"), "ReportCustomer.rpt"));

            rd.SetDataSource(allCustomer);

            Response.Buffer = false;
            Response.ClearContent();
            Response.ClearHeaders();


            Stream stream = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

            stream.Seek(0, SeekOrigin.Begin);
            return(File(stream, "application/pdf", "ViewInstallment.pdf"));
        }