public void RenderReport(int loanId)
        {
            //check authentication session is null, if null return
            if (Session["AuthenticatedUser"] == null) return;
            User userData = (User)Session["AuthenticatedUser"];

            //set reportviewr properties
            rptViewerLoanTerms.ProcessingMode = ProcessingMode.Local;
            rptViewerLoanTerms.Reset();
            rptViewerLoanTerms.LocalReport.EnableExternalImages = true;
            rptViewerLoanTerms.LocalReport.ReportPath = Server.MapPath("~/Reports/RptLoanTerms.rdlc");
            rptViewerLoanTerms.ZoomMode = ZoomMode.PageWidth;

            ReportAccess ra = new ReportAccess();

            //Get loan details and set to reportviwer
            List<RptLoanTerms> loanTermsDetails = ra.RptLoanTermsDetails(loanId);
            rptViewerLoanTerms.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", loanTermsDetails));

            List<LoanDetailsRpt> details = ra.GetLoanDetailsRptforCompanySummary(userData.Company_Id, userData.UserId);
            rptViewerLoanTerms.LocalReport.DataSources.Add(new ReportDataSource("DataSet6", details));

            //get curtailment schedule details and set to reportviwer
            CurtailmentAccess ca = new CurtailmentAccess();
            List<Curtailment> curtailments = ca.retreiveCurtailmentByLoanId(loanId);

            if (curtailments != null && curtailments.Count > 0)
            {
                for (int i = 0; i < curtailments.Count; i++)
                {
                    curtailments[i].CurtailmentId = i + 1;
                }
            }
            rptViewerLoanTerms.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", curtailments));

            //get fees details and set to reportviwer
            List<RptFeeLoanTerm> loanTermsFeeDetails = ra.RptLoanTermsFeeDetails(loanId);
            rptViewerLoanTerms.LocalReport.DataSources.Add(new ReportDataSource("DataSet3", loanTermsFeeDetails));

            //get reminders details and set to reportviwer
            List<RptEmailReminder> loanTermsEmailReminders = ra.RptLoanTermsEmailReminders(loanId);
            rptViewerLoanTerms.LocalReport.DataSources.Add(new ReportDataSource("DataSet4", loanTermsEmailReminders));

            //get unit types and set  to reportviwer
            IList<UnitType> unitTypes = ra.RptGetUnitTypes(loanId);
            rptViewerLoanTerms.LocalReport.DataSources.Add(new ReportDataSource("DataSet5", unitTypes));
        }
        /// <summary>
        /// Frontend Page: Report Page(Company Summary Report)
        /// Title: Display Company Summary details
        /// Designed: Kanishka SHM
        /// User story: 
        /// Developed: Kanishka SHM
        /// Date created: 
        /// </summary>
        public void RenderReport(int companyId)
        {
            //check authentication session is null, if null return
            if (Session["AuthenticatedUser"] == null) return;
            User userData = (User)Session["AuthenticatedUser"];

            //set report viewr property dynamically
            rptViewerCompanySummary.ProcessingMode = ProcessingMode.Local;
            rptViewerCompanySummary.Reset();
            rptViewerCompanySummary.LocalReport.EnableExternalImages = true;
            rptViewerCompanySummary.LocalReport.ReportPath = Server.MapPath("~/Reports/RptCompanySummary.rdlc");
            rptViewerCompanySummary.ZoomMode = ZoomMode.PageWidth;

            //get report header details
            ReportAccess ra = new ReportAccess();
            List<RptCompanySummary> loanSumaList = ra.RptGetCompanySummary(companyId);

            //set data source to report viwer - 1
            rptViewerCompanySummary.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", loanSumaList));

            List<LoanDetailsRpt> details = ra.GetLoanDetailsRptforCompanySummary(userData.Company_Id, userData.UserId);
            //set data source to report viwer - 2
            rptViewerCompanySummary.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", details));
        }