当前位置: 首页>>代码示例>>C#>>正文


C# ReportViewer.Reset方法代码示例

本文整理汇总了C#中ReportViewer.Reset方法的典型用法代码示例。如果您正苦于以下问题:C# ReportViewer.Reset方法的具体用法?C# ReportViewer.Reset怎么用?C# ReportViewer.Reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ReportViewer的用法示例。


在下文中一共展示了ReportViewer.Reset方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GenerateStatement

    /// <summary>
    /// GenerateStatement
    /// </summary>
    /// <param name="Report">string</param>
    /// <param name="DataSources">ReportDataSource[]</param>
    /// <param name="Parameters">ReportParameters[]</param>
    /// <returns></returns>
    /// <remarks></remarks>
    public static string GenerateStatement(string Report, string ReportName, ReportDataSource[] DataSources, ReportParameter[] Parameters)
    {
        ReportViewer viewer = new ReportViewer();

        viewer.ProcessingMode = ProcessingMode.Local;
        viewer.Reset();
        viewer.LocalReport.ReportPath = @"Reports\" + Report;
        viewer.LocalReport.DataSources.Clear();
        foreach (ReportDataSource ds in DataSources)
        {
            viewer.LocalReport.DataSources.Add(ds);
        }
        viewer.LocalReport.SetParameters(Parameters);
        viewer.LocalReport.Refresh();

        Warning[] warnings;
        string[] streamids;
        string mimeType;
        string encoding;
        string filenameExtension;

        byte[] bytes = viewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out filenameExtension, out streamids, out warnings);

        string filename = Path.Combine(Path.GetTempPath(), ReportName + ".pdf");
        using (FileStream fs = new FileStream(filename, FileMode.Create))
        {
            fs.Write(bytes, 0, bytes.Length);
        }

        return filename;
    }
开发者ID:tmgraves,项目名称:LoanServicing,代码行数:39,代码来源:Statements.cs

示例2: generateInvoicePDF

        public static string generateInvoicePDF(int invoiceID)
        {
            Microsoft.Reporting.WebForms.ReportViewer reportViewer = new ReportViewer();
            string reportPath = null;

            string appPath = ConfigurationManager.AppSettings["appPath"].ToString();

            invoiceReport = CRM.Repository.InvoiceManager.GetInvoiceForReport(invoiceID);

            if (invoiceReport != null) {
                reportViewer.Reset();

                reportViewer.LocalReport.DataSources.Clear();

                reportViewer.LocalReport.EnableExternalImages = true;

                ReportDataSource reportDataSource = new ReportDataSource();

                reportDataSource.Name = "DataSet1";

                reportDataSource.Value = invoiceReport;

                reportViewer.LocalReport.DataSources.Add(reportDataSource);

                reportViewer.LocalReport.ReportPath = HttpContext.Current.Server.MapPath("~/Content/Invoice.rdlc");

                reportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(invoiceReportSubReport);

                reportPath = string.Format("{0}/Temp/Invoice_{1}.pdf", appPath, invoiceID);

                Core.ReportHelper.savePDFFromLocalReport(reportViewer.LocalReport, reportPath);
            }

            return reportPath;
        }
开发者ID:Antoniotoress1992,项目名称:asp,代码行数:35,代码来源:ReportHelper.cs

示例3: PrintPage

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

            //create reportviwer & set reportviewr properties
            ReportViewer rptViewerLoanTermsPrint = new ReportViewer();
            rptViewerLoanTermsPrint.ProcessingMode = ProcessingMode.Local;
            rptViewerLoanTermsPrint.Reset();
            rptViewerLoanTermsPrint.LocalReport.EnableExternalImages = true;
            rptViewerLoanTermsPrint.LocalReport.ReportPath = Server.MapPath("~/Reports/RptLoanTerms.rdlc");
            rptViewerLoanTermsPrint.ZoomMode = ZoomMode.PageWidth;

            ReportAccess ra = new ReportAccess();

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

            List<LoanDetailsRpt> details = ra.GetLoanDetailsRptforCompanySummary(userData.Company_Id, userData.UserId);
            rptViewerLoanTermsPrint.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;
                }
            }
            rptViewerLoanTermsPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", curtailments));

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

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

            //get unit types and set  to reportviwer
            IList<UnitType> unitTypes = ra.RptGetUnitTypes(loanId);
            rptViewerLoanTermsPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet5", unitTypes));

            //return reportviwer
            return rptViewerLoanTermsPrint;
        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:51,代码来源:RptDivLoanTerms.aspx.cs

示例4: PrintPage

        /// <summary>
        /// Frontend Page: Advance Unit Page(Advance Unit Report)
        /// Title: Display Advance Units during session
        /// Designed: Kanishka SHM
        /// User story: 
        /// Developed: Kanishka SHM
        /// Date created: 
        /// </summary>
        public ReportViewer PrintPage(int loanId)
        {
            //Check authentication session is null then return
            if (Session["AuthenticatedUser"] == null) return null;
            User userData = (User)Session["AuthenticatedUser"];

            //create reportviwer & set reportviewr properties
            ReportViewer rptViewerAdvanceUnitPrint = new ReportViewer();
            rptViewerAdvanceUnitPrint.ProcessingMode = ProcessingMode.Local;
            rptViewerAdvanceUnitPrint.Reset();
            rptViewerAdvanceUnitPrint.LocalReport.EnableExternalImages = true;
            rptViewerAdvanceUnitPrint.LocalReport.ReportPath = Server.MapPath("~/Reports/RptAdvanceUnit.rdlc");
            
            List<Unit> units = (List<Unit>)Session["AdvItems"];

            //Get account details
            ReportAccess ra = new ReportAccess();
            List<LoanDetailsRpt> details = ra.TopHeaderDetails(loanId, userData.UserId);

            foreach (var dates in details)
            {
                dates.ReportDate = DateTime.Now.ToString("MM/dd/yyyy");
            }

            //Set data set to report
            rptViewerAdvanceUnitPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", details));

            //if unit count is not null and count is greater than 0, create xml string
            if (units != null && units.Count > 0)
            {
                try
                {
                    //create xml string
                    XElement xEle = new XElement("Units",
                    from unit in units
                    select new XElement("Unit",
                        new XElement("UnitId", unit.UnitId)
                        ));
                    string xmlDoc = xEle.ToString();

                    //get all advance unit during session
                    var advanceUnits = ra.AdvanceUnitsDuringSession(xmlDoc);

                    //Set data set to report
                    rptViewerAdvanceUnitPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", advanceUnits));
                }
                catch (Exception e)
                {
                    throw e;
                }
            }

            //return reportviwer
            return rptViewerAdvanceUnitPrint;
        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:63,代码来源:RptDivAdvanceUnit.aspx.cs

示例5: PrintPage

        //[HttpPost]
        public FileResult PrintPage()
        {
            if (Session["curtLaonId"] == null || Session["curtLaonId"].ToString() == "")
            {
                return null;
            }

            Warning[] warnings;
            string[] streamids;
            string mimeType;
            string encoding;
            string filenameExtension;
            ReportViewer rptViewerPrint = new ReportViewer();

            int loanId = (int) Session["curtLaonId"];
            //RptDivCUrtailmentReceiptDuringSession curtThisSession = new RptDivCUrtailmentReceiptDuringSession();
            //return curtThisSession.PrintPage(loanId);


            ReportViewer rptViewerCurtailmentReceiptDuringSessionPrint = new ReportViewer();
            rptViewerCurtailmentReceiptDuringSessionPrint.ProcessingMode = ProcessingMode.Local;
            rptViewerCurtailmentReceiptDuringSessionPrint.Reset();
            rptViewerCurtailmentReceiptDuringSessionPrint.LocalReport.EnableExternalImages = true;
            rptViewerCurtailmentReceiptDuringSessionPrint.LocalReport.ReportPath = Server.MapPath("~/Reports/RptCurtailmentDuringSession.rdlc");

            ReportAccess ra = new ReportAccess();
            List<LoanDetailsRpt> details = ra.TopHeaderDetails(loanId, userData.UserId);

            foreach (var dates in details)
            {
                dates.ReportDate = DateTime.Now.ToString("MM/dd/yyyy");
            }

            rptViewerCurtailmentReceiptDuringSessionPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", details));

            List<CurtailmentShedule> selectedCurtailmentSchedules =
                (List<CurtailmentShedule>)Session["CurtUnitDuringSession"];

            if (selectedCurtailmentSchedules != null && selectedCurtailmentSchedules.Count > 0)
            {
                rptViewerCurtailmentReceiptDuringSessionPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", selectedCurtailmentSchedules));
            }

            var bytes = rptViewerCurtailmentReceiptDuringSessionPrint.LocalReport.Render(
                "PDF", null, out mimeType, out encoding, out filenameExtension,
                out streamids, out warnings);

            var fsResult = File(bytes, "application/pdf");
            return fsResult;
        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:51,代码来源:CurtailmentsController.cs

示例6: PayCurtailments

        public string PayCurtailments(SelectedCurtailmentList selectedCurtailmentList, string needSend, string dealerEmail, string dueDate)
        {
            // if session expired -- return null 
            if (Session["loanCode"] == null || Session["loanCode"].ToString() == "")
                return null;

            var loanCode = Session["loanCode"].ToString(); // take loan code from session 
            string paidDate = "";

            var loanDetails = (new LoanSetupAccess()).GetLoanDetailsByLoanCode(loanCode); // take loan details of the loan code

            CurtailmentAccess curtailmentAccess = new CurtailmentAccess();
            string returnValue = curtailmentAccess.updateCurtailmets(selectedCurtailmentList, loanDetails.loanId, dealerEmail); // update curtailment details as paid


            // if curtailment successfully updated
            if (returnValue != null)
            {
                // saving for reporting purpose
                decimal totalpaid = 0.00M;
                List<CurtailmentShedule> selectedCurtailmentSchedules = selectedCurtailmentList.SelectedCurtailmentSchedules;
                foreach (var items in selectedCurtailmentSchedules)
                {
                    items.PaidDate = items.PayDate.ToString("MM/dd/yyyy");
                    totalpaid += items.CurtAmount;
                    paidDate = items.PaidDate;
                }

                foreach (var items in selectedCurtailmentSchedules)
                {
                    items.TotalAmountPaid = totalpaid;
                }

                Session["CurtUnitDuringSession"] = selectedCurtailmentSchedules;
                if (needSend == "Yes")
                {
                    ReportViewer rptViewerCurtailmentReceiptDuringSession = new ReportViewer();
                    rptViewerCurtailmentReceiptDuringSession.ProcessingMode = ProcessingMode.Local;
                    rptViewerCurtailmentReceiptDuringSession.Reset();
                    rptViewerCurtailmentReceiptDuringSession.LocalReport.EnableExternalImages = true;
                    rptViewerCurtailmentReceiptDuringSession.LocalReport.ReportPath = Server.MapPath("~/Reports/RptCurtailmentDuringSession.rdlc");

                    ReportAccess ra = new ReportAccess();
                    List<LoanDetailsRpt> details = ra.TopHeaderDetails(loanDetails.loanId, userData.UserId);

                    foreach (var dates in details)
                    {
                        dates.ReportDate = DateTime.Now.ToString("MM/dd/yyyy");
                    }

                    rptViewerCurtailmentReceiptDuringSession.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", details));

                    if (selectedCurtailmentSchedules != null && selectedCurtailmentSchedules.Count > 0)
                    {
                        try
                        {
                            rptViewerCurtailmentReceiptDuringSession.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", selectedCurtailmentSchedules));

                            Warning[] warnings;
                            string[] streamids;
                            string mimeType;
                            string encoding;
                            string filenameExtension;

                            //create pdf file
                            byte[] bytes = rptViewerCurtailmentReceiptDuringSession.LocalReport.Render(
                                "PDF", null, out mimeType, out encoding, out filenameExtension,
                                out streamids, out warnings);

                            if (dealerEmail != "")
                            {
                                string mailSubject = "Curtailment Paid Receipt - Loan " + loanDetails.loanNumber;
                                string mailBody =
                                    "Curtailments for Loan " + loanDetails.loanNumber + " which were due on or before " + dueDate  + " have been paid on " + paidDate + ". " +
                                    "Please view the attached PDF file for full curtailment payment details. " +
                                    Environment.NewLine + Environment.NewLine +
                                    "Thank you," +
                                    Environment.NewLine +
                                    "Dealer Floor Plan Software Team";

                                Thread thread = new Thread(delegate ()
                                {
                                    Email email = new Email(dealerEmail);
                                    email.SendMailWithAttachment(mailSubject, mailBody, bytes);
                                });

                                thread.IsBackground = true;
                                thread.Start();

                            }

                        }
                        catch (Exception e)
                        {
                            throw e;
                        }
                    }
                }

                //insert to log
//.........这里部分代码省略.........
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:101,代码来源:CurtailmentsController.cs

示例7: RenderStatement

    /// <summary>
    /// RenderStatement
    /// </summary>
    /// <param name="Report">string</param>
    /// <param name="DataSources">ReportDataSource[]</param>
    /// <param name="Parameters">ReportParameters[]</param>
    /// <returns></returns>
    /// <remarks></remarks>
    public static byte[] RenderStatement(string Report, ReportDataSource[] DataSources, ReportParameter[] Parameters)
    {
        ReportViewer viewer = new ReportViewer();

        viewer.ProcessingMode = ProcessingMode.Local;
        viewer.Reset();
        viewer.LocalReport.ReportPath = @"Reports\" + Report;
        viewer.LocalReport.DataSources.Clear();
        foreach (ReportDataSource ds in DataSources)
        {
            viewer.LocalReport.DataSources.Add(ds);
        }

        viewer.LocalReport.SetParameters(Parameters);
        viewer.LocalReport.Refresh();

        Warning[] warnings;
        string[] streamids;
        string mimeType;
        string encoding;
        string filenameExtension;

        byte[] bytes = viewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out filenameExtension, out streamids, out warnings);

        return bytes;
    }
开发者ID:tmgraves,项目名称:LoanServicing,代码行数:34,代码来源:Statements.cs

示例8: PrintPage

        /// <summary>
        /// Frontend Page: Report(monthly loan fee invoice)
        /// Title:print monthly loan fee invoice report
        /// Deigned:Piyumi Perera
        /// User story:
        /// Developed:Piyumi Perera
        /// Date created:
        /// </summary>
        /// <param name="loanId"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <returns></returns>
        public ReportViewer PrintPage(int loanId, DateTime startDate, DateTime endDate)
        {
            //check session is null
            if (Session["AuthenticatedUser"] == null) return null;
            User userData = (User)Session["AuthenticatedUser"];

            ReportViewer rptViewerMonthlyLoanFeeInvoicePrint = new ReportViewer();
            rptViewerMonthlyLoanFeeInvoicePrint.ProcessingMode = ProcessingMode.Local;
            rptViewerMonthlyLoanFeeInvoicePrint.Reset();
            rptViewerMonthlyLoanFeeInvoicePrint.LocalReport.EnableExternalImages = true;
            rptViewerMonthlyLoanFeeInvoicePrint.LocalReport.ReportPath = Server.MapPath("~/Reports/RptMonthlyLoanFeeInvoice.rdlc");

            ReportAccess ra = new ReportAccess();
            //get loan details of selected loan
            List<LoanDetailsRpt> details = ra.GetLoanDetailsRpt(loanId, userData.UserId);

            foreach (var dates in details)
            {
                //assign date fields values
                dates.StartRange = startDate.ToString("MM/dd/yyyy");
                dates.EndRange = endDate.ToString("MM/dd/yyyy");
                dates.ReportDate = DateTime.Now.ToString("MM/dd/yyyy");
            }

            //get monthly loan fee details which match with given date range
            List<RptFee> monthlyLoanFeeInvoice = ra.GetFeeInvoiceByDateRange(loanId, "monthlyLoanFee", startDate, endDate);
            //add data sources
            rptViewerMonthlyLoanFeeInvoicePrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", details));
            rptViewerMonthlyLoanFeeInvoicePrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", monthlyLoanFeeInvoice));
            
            return rptViewerMonthlyLoanFeeInvoicePrint;
        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:44,代码来源:RptDivMonthlyLoanFeeInvoice.aspx.cs

示例9: PrintPage

        /// <summary>
        /// Frontend Page: Add Unit(Add Unit Report)
        /// Title: Display Advance Units print page
        /// Designed: Kanishka SHM
        /// User story: 
        /// Developed: Kanishka SHM
        /// Date created: 
        /// </summary>
        public ReportViewer PrintPage(int loanId, int userId)
        {
            //Check authentication session is null then return
            if (Session["AuthenticatedUser"] == null) return null;
            User userData = (User)Session["AuthenticatedUser"];

            ReportViewer rptViewerAddUnitPrint = new ReportViewer();

            rptViewerAddUnitPrint.ProcessingMode = ProcessingMode.Local;
            rptViewerAddUnitPrint.Reset();
            rptViewerAddUnitPrint.LocalReport.EnableExternalImages = true;
            rptViewerAddUnitPrint.LocalReport.ReportPath = Server.MapPath("~/Reports/RptAddUnit.rdlc");
            rptViewerAddUnitPrint.ZoomMode = ZoomMode.PageWidth;

            //Get account details
            ReportAccess ra = new ReportAccess();
            List<LoanDetailsRpt> details = ra.TopHeaderDetails(loanId, userData.UserId);

            foreach (var dates in details)
            {
                dates.ReportDate = DateTime.Now.ToString("MM/dd/yyyy");
            }

            //Set data set to report
            rptViewerAddUnitPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", details));

            //
            List<RptAddUnit> units = ra.GetJustAddedUnitDetails(userId, loanId);

            //Set data set to report
            rptViewerAddUnitPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", units));

            //return reportviwer
            return rptViewerAddUnitPrint;
        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:43,代码来源:RptDivAddUnit.aspx.cs

示例10: PrintPage

        /// <summary>
        /// Frontend Page: Report page(Branch Summary report)
        /// Title: Display Branch Summary print page
        /// Designed: Piyumi Perera
        /// User story: 
        /// Developed: Piyumi Perera
        /// Date created: 
        /// </summary>
        public ReportViewer PrintPage(int branchId,string branchName)
        {
            //check authentication session is null, if null return
            if (Session["AuthenticatedUser"] == null) return null;
            User userData = (User)Session["AuthenticatedUser"];

            //create reportviwer & set reportviewr properties
            ReportViewer rptViewerBranchSummaryPrint = new ReportViewer();
            rptViewerBranchSummaryPrint.ProcessingMode = ProcessingMode.Local;
            rptViewerBranchSummaryPrint.Reset();
            rptViewerBranchSummaryPrint.LocalReport.EnableExternalImages = true;
            rptViewerBranchSummaryPrint.LocalReport.ReportPath = Server.MapPath("~/Reports/RptBranchSummary.rdlc");
            rptViewerBranchSummaryPrint.ZoomMode = ZoomMode.PageWidth;

            ReportAccess ra = new ReportAccess();
            User usr = new User();
            usr = (new UserAccess()).retreiveUserByUserId(userData.UserId);
            List<LoanDetailsRpt> details = new List<LoanDetailsRpt>();
            LoanDetailsRpt detail = new LoanDetailsRpt();
            detail.CompanyName = userData.CompanyName;
            
            detail.ReportDate = DateTime.Now.ToString("MM/dd/yyyy");
            detail.CreaterName = usr.FirstName + " " + usr.LastName;
            detail.LenderBrnchName = branchName;
            details.Add(detail);
            rptViewerBranchSummaryPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", details));

            foreach (var dates in details)
            {
                dates.ReportDate = DateTime.Now.ToString("MM/dd/yyyy");
            }
            List<RptBranchSummary> branchSummary = ra.GetBranchSummarRptDetails(branchId);

            rptViewerBranchSummaryPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", branchSummary));

            return rptViewerBranchSummaryPrint;
        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:45,代码来源:RptDivBranchSummary.aspx.cs

示例11: PrintPage

        /// <summary>
        /// Frontend Page: Report(lot inspection fee receipt)
        /// Title:print lot inspection fee receipt report
        /// Deigned:Piyumi Perera
        /// User story:
        /// Developed:Piyumi Perera
        /// Date created: 
        /// </summary>
        /// <param name="loanId"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <returns></returns>
        public ReportViewer PrintPage(int loanId, DateTime startDate, DateTime endDate)
        {
            //check authentication session is null, if null return
            if (Session["AuthenticatedUser"] == null) return null;
            User userData = (User)Session["AuthenticatedUser"];

            ReportViewer rptViewerLotInspectionFeeReceiptPrint = new ReportViewer();
            rptViewerLotInspectionFeeReceiptPrint.ProcessingMode = ProcessingMode.Local;
            rptViewerLotInspectionFeeReceiptPrint.Reset();
            rptViewerLotInspectionFeeReceiptPrint.LocalReport.EnableExternalImages = true;
            rptViewerLotInspectionFeeReceiptPrint.LocalReport.ReportPath = Server.MapPath("~/Reports/RptLotInspectionFeeReceipt.rdlc");

            ReportAccess ra = new ReportAccess();
            //get loan details of selected loan
            List<LoanDetailsRpt> details = ra.GetLoanDetailsRpt(loanId, userData.UserId);

            foreach (var dates in details)
            {
                //assign date fields values
                dates.StartRange = startDate.ToString("MM/dd/yyyy");
                dates.EndRange = endDate.ToString("MM/dd/yyyy");
                dates.ReportDate = DateTime.Now.ToString("MM/dd/yyyy");
            }

            //get paid lot inspection fee details
            List<RptFee> curtailments = ra.GetFeeReceiptByDateRange(loanId, "lotInspectionFee", startDate, endDate);
            //add data sources
            rptViewerLotInspectionFeeReceiptPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", details));
            rptViewerLotInspectionFeeReceiptPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", curtailments));

            return rptViewerLotInspectionFeeReceiptPrint;
        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:44,代码来源:RptDivLotInspectionFeeReceipt.aspx.cs

示例12: PrintPage

        /*

            Frontend page: Report Page
            Title: Load pdf view on browser
            Designed: Kanishka SHM
            User story: 
            Developed: Kanishka SHM
            Date created: 

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

            //set report viewr property dynamically
            ReportViewer rptViewerTitleStatusPrint = new ReportViewer();
            rptViewerTitleStatusPrint.ProcessingMode = ProcessingMode.Local;
            rptViewerTitleStatusPrint.Reset();
            rptViewerTitleStatusPrint.LocalReport.EnableExternalImages = true;
            rptViewerTitleStatusPrint.LocalReport.ReportPath = Server.MapPath("~/Reports/RptTitleStatus.rdlc");

            //get report header details
            ReportAccess ra = new ReportAccess();
            List<LoanDetailsRpt> details = ra.TopHeaderDetails(loanId, userData.UserId);

            foreach (var dates in details)
            {
                dates.ReportDate = DateTime.Now.ToString("MM/dd/yyyy");
            }

            //Get unit details by given title status
            List<Unit> units = ra.GeUnitDetailsByTitleStatus(loanId, titleStatus);

            //set data source to report viwer
            rptViewerTitleStatusPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", details));
            rptViewerTitleStatusPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", units));

            return rptViewerTitleStatusPrint;
        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:41,代码来源:RptDivTitleStatus.aspx.cs

示例13: PrintPage

        /// <summary>
        /// Frontend Page: Pay Curtailment Page(Curtailment Receipt Report)
        /// Title: Display Curtailment Receipt print page
        /// Designed: Kanishka SHM
        /// User story: 
        /// Developed: Kanishka SHM
        /// Date created: 
        /// </summary>
        public ReportViewer PrintPage(int loanId)
        {
            //Check authentication session is null then return
            if (Session["AuthenticatedUser"] == null) return null;
            User userData = (User)Session["AuthenticatedUser"];

            //create reportviwer & set reportviewr properties
            ReportViewer rptViewerCurtailmentReceiptDuringSessionPrint = new ReportViewer();
            rptViewerCurtailmentReceiptDuringSessionPrint.ProcessingMode = ProcessingMode.Local;
            rptViewerCurtailmentReceiptDuringSessionPrint.Reset();
            rptViewerCurtailmentReceiptDuringSessionPrint.LocalReport.EnableExternalImages = true;
            rptViewerCurtailmentReceiptDuringSessionPrint.LocalReport.ReportPath = Server.MapPath("~/Reports/RptCurtailmentDuringSession.rdlc");

            //Get account details
            ReportAccess ra = new ReportAccess();
            List<LoanDetailsRpt> details = ra.TopHeaderDetails(loanId, userData.UserId);

            foreach (var dates in details)
            {
                dates.ReportDate = DateTime.Now.ToString("MM/dd/yyyy");
            }

            //Set data set to report
            rptViewerCurtailmentReceiptDuringSessionPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", details));

            //get unit curatilment details during session
            List<CurtailmentShedule> selectedCurtailmentSchedules =
                (List<CurtailmentShedule>)Session["CurtUnitDuringSession"];

            if (selectedCurtailmentSchedules != null && selectedCurtailmentSchedules.Count > 0)
            {
                rptViewerCurtailmentReceiptDuringSessionPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", selectedCurtailmentSchedules));
            }
            
            return rptViewerCurtailmentReceiptDuringSessionPrint;
        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:44,代码来源:RptDivCUrtailmentReceiptDuringSession.aspx.cs

示例14: LoadInvoiceReportViewer

        void LoadInvoiceReportViewer(ReportViewer reportViewer)
        {
            reportViewer.Reset();
            ReportDataSource reportDataSourceHeader = null;
            ReportDataSource reportDataSourceLineItems = null;
            Stream stream = null;
            Stream subReportStream = null;
            string subReportName = null;

            var invoiceReport = GetInvoice(DocumentId);
            reportDataSourceHeader = new ReportDataSource("dsInvoiceHeader",
                                                          new List<InvoiceReportHeader> { invoiceReport.InvoiceHeader });
            reportDataSourceLineItems = new ReportDataSource("dsInvoiceLineItems", invoiceReport.InvoiceLineItems);
            var reportDataSourcePaymentLineItems = new ReportDataSource("dsInvoicePayments", invoiceReport.PaymentInformationLineItems);
            var reportDataSourceDeductions = new ReportDataSource("dsInvoiceDeductions", invoiceReport.InvoiceDeductionsLineItems);

            stream = Assembly.GetEntryAssembly().GetManifestResourceStream(ReportCollective.InvoiceReport);
            reportViewer.LocalReport.DisplayName = "Invoice";

            subReportName = "rptCompanyLetterHead.rdlc";
            subReportStream = Assembly.GetEntryAssembly().GetManifestResourceStream(ReportCollective.CompanyLetterHead);

            reportViewer.LocalReport.DataSources.Clear();
            reportViewer.ProcessingMode = ProcessingMode.Local;
            reportViewer.LocalReport.EnableHyperlinks = true;

            reportViewer.LocalReport.DataSources.Add(reportDataSourceHeader);
            reportViewer.LocalReport.DataSources.Add(reportDataSourceLineItems);
            reportViewer.LocalReport.DataSources.Add(reportDataSourcePaymentLineItems);
            reportViewer.LocalReport.DataSources.Add(reportDataSourceDeductions);

            reportViewer.LocalReport.LoadSubreportDefinition(subReportName, subReportStream);

            reportViewer.LocalReport.ShowDetailedSubreportMessages = true;
            reportViewer.LocalReport.SubreportProcessing += LocalReport_SubreportProcessing;

            reportViewer.LocalReport.LoadReportDefinition(stream);

            reportViewer.LocalReport.Refresh();
            reportViewer.RefreshReport();

            Title = reportViewer.LocalReport.DisplayName;
        }
开发者ID:asanyaga,项目名称:BuildTest,代码行数:43,代码来源:DocumentReportViewerViewModel.cs

示例15: PrintPage

        /// <summary>
        /// Frontend Page: Report page(Advance Fee Receipt Report)
        /// Title: Display Advance Fee Receipt
        /// Designed: Kasun Samarawickrama
        /// User story: 
        /// Developed: Kasun Samarawickrama
        /// Date created: 
        /// </summary>
        public ReportViewer PrintPage(int loanId, DateTime startDate, DateTime endDate)
        {
            //Check authentication session is null then return
            if (Session["AuthenticatedUser"] == null) return null;
            User userData = (User)Session["AuthenticatedUser"];

            ReportViewer rptViewerAdvanceFeeReceiptPrint = new ReportViewer();

            rptViewerAdvanceFeeReceiptPrint.ProcessingMode = ProcessingMode.Local;
            rptViewerAdvanceFeeReceiptPrint.Reset();
            rptViewerAdvanceFeeReceiptPrint.LocalReport.EnableExternalImages = true;
            rptViewerAdvanceFeeReceiptPrint.LocalReport.ReportPath = Server.MapPath("~/Reports/RptAdvanceFeeReceipt.rdlc");
            rptViewerAdvanceFeeReceiptPrint.ZoomMode = ZoomMode.PageWidth;

            //Get account details
            ReportAccess ra = new ReportAccess();
            List<LoanDetailsRpt> details = ra.TopHeaderDetails(loanId, userData.UserId);

            foreach (var dates in details)
            {
                dates.StartRange = startDate.ToString("MM/dd/yyyy");
                dates.EndRange = endDate.ToString("MM/dd/yyyy");
                dates.ReportDate = DateTime.Now.ToString("MM/dd/yyyy");
            }

            //Get Advance Fee receipt during time period
            List<RptFee> curtailments = ra.GetFeeReceiptByDateRange(loanId, "advanceFee", startDate, endDate);

            //Set data set to report
            rptViewerAdvanceFeeReceiptPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", details));
            rptViewerAdvanceFeeReceiptPrint.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", curtailments));

            //return reportviwer
            return rptViewerAdvanceFeeReceiptPrint;
        }
开发者ID:kasunsamarawickrama,项目名称:BankLoanSystem,代码行数:43,代码来源:RptDivAdvanceFeeReceipt.aspx.cs


注:本文中的ReportViewer.Reset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。