public override void Export() { var report = ViewState["AccountTransactionReport"] as AccountTransactionReport; if (report != null) { var document = new ExcelDocument(); document.WriteTitle(report.Title); Hashtable hashtable = new Hashtable(); hashtable.Add("Client", "ClientName"); ReportGridView.WriteToExcelDocumentWithReplaceField(document, hashtable); document.InsertEmptyRow(); document.AddCell("Total Debits"); document.AddCurrencyCell(report.TotalCredit, 3); //ReportGridView.Columns["Debit"] document.MoveToNextRow(); document.AddCell("Total Credits"); document.AddCurrencyCell(report.TotalCredit, 4); //ReportGridView.Columns["Credit"].Index) document.MoveToNextRow(); document.AddCell("Movement"); document.AddCurrencyCell(report.TotalCredit, 5); //ReportGridView.Columns["Credit"].Index document.InsertEmptyRow(); document.AddCell("Date Viewed"); document.AddCell(DateTime.Now.ToShortDateString()); WriteToResponse(document.WriteToStream(), report.ExportFileName); } }
public override void Export() { var report = ViewState["PromptReport"] as PromptReport; if (report != null) { ExcelDocument document = new ExcelDocument(); document.WriteTitle(report.Title); Hashtable hashtable = new Hashtable(); hashtable.Add("Client", "ClientName"); hashtable.Add("Customer", "CustomerName"); ReportGridView.WriteToExcelDocumentWithReplaceField(document, hashtable); document.InsertEmptyRow(); document.AddCell("Funded Balance"); //document.AddCurrencyCell(report.FundedBalanceTotal, ReportGridView.Columns["Amount"].Index); document.MoveToNextRow(); document.AddCell("Non Funded Balance"); //document.AddCurrencyCell(report.NonFundedBalancedTotal, ReportGridView.Columns["Amount"].Index); document.InsertEmptyRow(); document.AddCell("Date Viewed"); document.AddCell(report.DateViewed.ToDateTimeString()); WriteToResponse(document.WriteToStream(), report.ExportFileName); } }
public override void Export() { var report = ViewState["InvoicesTransactionReport"] as InvoicesTransactionReport; if (report != null) { var document = new ExcelDocument(); document.WriteTitle(report.Title); Hashtable hashtable = new Hashtable(); hashtable.Add("Customer", "CustomerName"); ReportGridView.WriteToExcelDocumentWithReplaceField(document, hashtable); document.InsertEmptyRow(); document.AddCell("Funded Total"); //document.AddCurrencyCell(report.FundedTotal, // ReportGridView.Columns["Amount"].Index); document.MoveToNextRow(); document.AddCell("Non Funded Total"); //document.AddCurrencyCell(report.NonFundedTotal, // ReportGridView.Columns["Amount"].Index); document.InsertEmptyRow(); document.AddCell("Based on"); document.AddCell("Invoice Date"); document.AddCell("BOM Following"); document.AddCell("Count"); document.MoveToNextRow(); document.AddCell("Mean Debtor Days"); document.AddNumericCellToCurrentRow(report.MeanDebtorDays); document.AddNumericCellToCurrentRow(report.MeanDebtorDaysFromBeginningOfFollowingMonth); document.AddNumericCellToCurrentRow(report.NumberOfRecordsPaidFor); document.MoveToNextRow(); document.AddCell("Mean Age of Unpaid "); document.AddNumericCellToCurrentRow(report.MeanAgeOfUnpaidRecords); document.AddNumericCellToCurrentRow(report.MeanAgeOfUnpaidRecordsFromBeginningOfFollowingMonth); document.AddNumericCellToCurrentRow(report.NumberOfRecordsNotPaidFor); document.InsertEmptyRow(); document.AddCell("Date Viewed"); document.AddCell(report.DateViewed.ToDateTimeString()); WriteToResponse(document.WriteToStream(), report.ExportFileName); } }
public override void Export() { StatusReport report = ViewState["StatusReport"] as StatusReport; if (report != null) { var document = new ExcelDocument(); document.WriteTitle(report.Title); Hashtable hashtable = new Hashtable(); hashtable.Add("Client", "ClientName"); hashtable.Add("Customer", "CustomerName"); reportGridView.WriteToExcelDocumentWithReplaceField(document, hashtable); document.MoveToNextRow(); document.MoveToNextRow(); document.AddCell("Date Viewed"); document.AddCell(report.DateViewed.ToDateTimeString()); WriteToResponse(document.WriteToStream(), report.ExportFileName); } }
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); } }