コード例 #1
0
 public void DisplayReport(RetentionReleaseEstimateReport report)
 {
     this.DateViewedLiteral.Text = report.DateViewed.ToDateTimeString();
     Master.ShowReportViewer();
     ReportPanel.ResetPaginationAndFocus();
     ReportPanel.Display(report);
 }
コード例 #2
0
        public void Display(RetentionReleaseEstimateReport report)
        {
            ViewState.Add("RetentionReleaseEstimateReport", report);

            if (report != null)
            {
                RetentionReleaseEstimateReport retentionReleaseEstimateReport = report;

                CffGGV_ReportGridView.DataSource = retentionReleaseEstimateReport.Records;
                CffGGV_ReportGridView.DataBind();

                ReleaseSummary releases = retentionReleaseEstimateReport.ReleaseSummary;
                FundedTransactionReleaseLiteral.Text    = releases.FundedTransactionRelease.ToString("C");
                NonFundedTransactionReleaseLiteral.Text = releases.NonFundedTransactionRelease.ToString("C");
                ReleaseTotal.Text = releases.Total.ToString("C");

                Deductables deductables = retentionReleaseEstimateReport.Deductables;
                UnclaimedCreditsLiteral.Text     = deductables.UnclaimedCredits.ToString("C");
                UnclaimedRepurchasesLiteral.Text = deductables.UnclaimedRepurchases.ToString("C");
                UnclaimedDiscountsLiteral.Text   = deductables.UnclaimedDiscounts.ToString("C");
                LikelyRepurchasesLiteral.Text    = deductables.LikelyRepurchases.ToString("C");
                OverdueChargesLiteral.Text       = deductables.OverdueCharges.ToString("C");

                Fee chequeFee = deductables.ChequeFee;
                ChequeFeeLiteral.Text       = chequeFee.Rate.ToString("C");
                NumberOfChequesLiteral.Text = chequeFee.Count.ToString();
                ChequeFeesLiteral.Text      = chequeFee.Total.ToString("C");

                Fee postage = deductables.Postage;
                PostageFeeLiteral.Text    = postage.Rate.ToString("C");
                NumberOfPostsLiteral.Text = postage.Count.ToString();
                PostageFeesLiteral.Text   = postage.Total.ToString("C");

                Fee letterFee = deductables.LetterFees;
                LetterFeeLiteral.Text       = letterFee.Rate.ToString("C");
                NumberOfLettersLiteral.Text = letterFee.Count.ToString();
                LetterFeesLiteral.Text      = letterFee.Total.ToString("C");

                DeductablesTotalLiteral.Text = deductables.Total.ToString("C");

                EstimatedReleaseLiteral.Text = retentionReleaseEstimateReport.EstimatedRelease.ToString("C");
                DateViewedLiteral.Text       = retentionReleaseEstimateReport.DateViewed.ToDateTimeString();
            }
        }
コード例 #3
0
        public override void Export()
        {
            RetentionReleaseEstimateReport report =
                ViewState["RetentionReleaseEstimateReport"] as RetentionReleaseEstimateReport;

            if (report != null)
            {
                var document = new ExcelDocument();

                document.WriteTitle(report.Title);

                Hashtable hashtable = new Hashtable();
                hashtable.Add("Customer", "CustomerName");

                CffGGV_ReportGridView.WriteToExcelDocumentWithReplaceField(document, hashtable);

                document.InsertEmptyRow();

                document.AddCell("Release from Funded Transactions");
                document.AddCurrencyCell(report.ReleaseSummary.FundedTransactionRelease, 3);
                document.MoveToNextRow();
                document.AddCell("Release from Non Funded Transactions");
                document.AddCurrencyCell(report.ReleaseSummary.NonFundedTransactionRelease, 3);
                document.MoveToNextRow();
                document.AddCurrencyCell(report.ReleaseSummary.Total, 4);

                document.InsertEmptyRow();

                Deductables deductables = report.Deductables;
                document.AddCell("Unclaimed Credits");
                document.AddCurrencyCell(deductables.UnclaimedCredits, 3);
                document.MoveToNextRow();
                document.AddCell("Unclaimed Prepayments");
                document.AddCurrencyCell(deductables.UnclaimedRepurchases, 3);
                document.MoveToNextRow();
                document.AddCell("Unclaimed Discounts");
                document.AddCurrencyCell(deductables.UnclaimedDiscounts, 3);
                document.MoveToNextRow();
                document.AddCell("Likely Repurchases");
                document.AddCurrencyCell(deductables.LikelyRepurchases, 3);
                document.MoveToNextRow();
                document.AddCell("Interest & Charges");
                document.AddCurrencyCell(deductables.OverdueCharges, 3);
                document.MoveToNextRow();
                document.AddCell(string.Format("Cheque Fees ({0} at {1})", deductables.ChequeFee.Count,
                                               deductables.ChequeFee.Rate.ToString("C")));
                document.AddCurrencyCell(deductables.ChequeFee.Total, 3);
                document.MoveToNextRow();
                document.AddCell(string.Format("Postage Fees ({0} at {1})", deductables.Postage.Count,
                                               deductables.Postage.Rate.ToString("C")));
                document.AddCurrencyCell(report.Deductables.Postage.Total, 3);
                document.MoveToNextRow();
                document.AddCell(string.Format("Letter fees ({0} at {1})", deductables.LetterFees.Count,
                                               deductables.LetterFees.Rate.ToString("C")));
                document.AddCurrencyCell(deductables.LetterFees.Total, 3);
                document.MoveToNextRow();
                document.AddCurrencyCell(deductables.Total, 4);

                document.InsertEmptyRow();
                document.AddCell("Estimated Release");
                document.AddCurrencyCell(report.EstimatedRelease, 4);

                document.InsertEmptyRow();
                document.AddCell("Date Viewed");
                document.AddCell(report.DateViewed.ToDateTimeString());

                WriteToResponse(document.WriteToStream(), report.ExportFileName);
            }
        }