public override void Export() { OverdueChargesReport report = ViewState["OverdueChargesReport"] as OverdueChargesReport; if (report != null) { var document = new ExcelDocument(); document.WriteTitle(report.Title); if (this.CurrentScope() == Scope.AllClientsScope) { reportGridView.Columns[0].Visible = false; //remove the client number from report reportGridView.Columns[2].Visible = false; //remove the customer number from report } else if (this.CurrentScope() == Scope.ClientScope) { reportGridView.Columns[0].Visible = false; //remove the customer number from report } reportGridView.WriteToExcelDocument(document); document.MoveToNextRow(); document.MoveToNextRow(); document.AddCell("Date Viewed"); document.AddCell(report.DateViewed.ToDateTimeString()); WriteToResponse(document.WriteToStream(), report.ExportFileName); } }
public override void Export() { var report = ViewState["TransactionReport"] as TransactionReport; if (report != null) { ExcelDocument document = new ExcelDocument(); document.WriteTitle(report.Title); ReportGridView.Columns[0].Visible = false; //do not display in report ReportGridView.WriteToExcelDocument(document); document.InsertEmptyRow(); document.MoveToNextRow(); document.AddCell("Funded Total"); document.AddCurrencyCell(report.FundedTotal); document.MoveToNextRow(); document.AddCell("Non Funded Total"); document.AddCurrencyCell(report.NonFundedTotal); document.InsertEmptyRow(); document.AddCell("Date Viewed"); document.AddCell(report.DateViewed.ToDateTimeString()); WriteToResponse(document.WriteToStream(), report.ExportFileName); } }
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() { var report = ViewState["CustomerTransactionReport"] as CustomerTransactionReport; if (report != null) { var document = new ExcelDocument(); document.WriteTitle(report.Title); ReportGridView.WriteToExcelDocument(document); 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() { ControlReport report = ViewState["ControlReport"] as ControlReport; if (report != null) { ExcelDocument document = new ExcelDocument(true); document.WriteTitle(report.Title); DebtorsLedger debtorsLedger = report.DebtorsLedger; document.FormatAsHeaderRow(3); document.AddHeaderCell("Debtors Ledger"); document.MoveToNextRow(); document.AddCell("Current:"); document.AddCurrencyCell(debtorsLedger.Current); document.MoveToNextRow(); document.AddCell("1 month:"); document.AddCurrencyCell(debtorsLedger.OneMonth); document.MoveToNextRow(); document.AddCell("2 months:"); document.AddCurrencyCell(debtorsLedger.TwoMonths); document.MoveToNextRow(); document.AddCell("3 months & over:"); document.AddCurrencyCell(debtorsLedger.ThreeMonthsAndOver); document.MoveToNextRow(); document.AddCell("Total Ledger:"); document.AddCurrencyCell(debtorsLedger.Total, 2); document.MoveToNextRow(); FactorsLedger factorsLedger = report.FactorsLedger; document.FormatAsHeaderRow(3); document.AddHeaderCell("Factors Ledger"); document.MoveToNextRow(); Subledger broughtForwardLedger = factorsLedger.BroughtForwardLedger; document.FormatAsSubheaderRow(3); document.AddHeaderCell("Brought Forward"); document.MoveToNextRow(); document.AddCell("Funded Invoices:"); document.AddCurrencyCell(broughtForwardLedger.FundedInvoices); document.MoveToNextRow(); document.AddCell("Non Funded Invoices:"); document.AddCurrencyCell(broughtForwardLedger.NonFundedInvoices); document.MoveToNextRow(); document.AddCell("Credit Notes:"); document.AddCurrencyCell(broughtForwardLedger.CreditNotes); document.MoveToNextRow(); document.AddCell("Net Journals:"); document.AddCurrencyCell(broughtForwardLedger.NetJournals); document.MoveToNextRow(); document.AddCell("Cash Received:"); document.AddCurrencyCell(broughtForwardLedger.CashReceived); document.MoveToNextRow(); document.AddCell("Overpayments:"); document.AddCurrencyCell(broughtForwardLedger.Overpayments); document.MoveToNextRow(); document.AddCell("Net Adjustment:"); document.AddCurrencyCell(broughtForwardLedger.NetAdjustment); document.MoveToNextRow(); document.AddCell("Discounts:"); document.AddCurrencyCell(broughtForwardLedger.Discounts); document.MoveToNextRow(); document.AddCell("Total Brought Foward:"); document.AddCurrencyCell(broughtForwardLedger.Total, 2); document.MoveToNextRow(); Subledger currentLedger = factorsLedger.CurrentLedger; document.FormatAsSubheaderRow(3); document.AddHeaderCell("Current"); document.MoveToNextRow(); document.AddCell("Funded Invoices:"); document.AddCurrencyCell(currentLedger.FundedInvoices); document.MoveToNextRow(); document.AddCell("Non Funded Invoices:"); document.AddCurrencyCell(currentLedger.NonFundedInvoices); document.MoveToNextRow(); document.AddCell("Credit Notes:"); document.AddCurrencyCell(currentLedger.CreditNotes); document.MoveToNextRow(); document.AddCell("Net Journals:"); document.AddCurrencyCell(currentLedger.NetJournals); document.MoveToNextRow(); document.AddCell("Cash Received:"); document.AddCurrencyCell(currentLedger.CashReceived); document.MoveToNextRow(); document.AddCell("Overpayments:"); document.AddCurrencyCell(currentLedger.Overpayments); document.MoveToNextRow(); document.AddCell("Net Adjustment:"); document.AddCurrencyCell(currentLedger.NetAdjustment); document.MoveToNextRow(); document.AddCell("Discounts:"); document.AddCurrencyCell(currentLedger.Discounts); document.MoveToNextRow(); document.FormatAsSubheaderRow(3); document.AddHeaderCell("Total Current:"); document.AddCurrencyHeaderCellLedger(currentLedger.Total, 2, false); document.MoveToNextRow(); document.FormatAsSubheaderRow(3); document.AddHeaderCell("Total Ledger:"); document.AddCurrencyHeaderCellLedger(factorsLedger.Total, 2, true); document.InsertEmptyRow(); document.AddCell("Balance of Funded Invoices:"); document.AddCurrencyCell(report.FundedInvoicesBalance); document.MoveToNextRow(); document.AddCell("Balance of Non Funded Invoices:"); document.AddCurrencyCell(report.NonFundedInvoicesBalance); document.MoveToNextRow(); document.AddCell("Unallocated Transactions:"); document.AddCurrencyCell(report.UnallocatedTransactions); document.AddCurrencyCellLedger(report.FundedInvoicesBalance + report.NonFundedInvoicesBalance + report.UnallocatedTransactions, 2, true); document.MoveToNextRow(); document.AddCell("Prepayments this Month:"); document.AddCurrencyCell(report.RepurchasesThisMonth); document.MoveToNextRow(); document.AddCell("Prepayments to be Claimed:"); document.AddCurrencyCell(report.FundedToBeRepurchased); document.MoveToNextRow(); document.AddCell("Credits to be Claimed:"); document.AddCurrencyCell(report.CreditsToBeClaimed); document.MoveToNextRow(); document.AddCell("Allocated in Period:"); document.AddCurrencyCell(report.AllocatedThisPeriod); document.MoveToNextRow(); document.AddCell("CBT's in Period:"); document.AddCurrencyCell(report.CbtsInPeriod); document.MoveToNextRow(); document.InsertEmptyRow(); document.AddCell("Date Viewed"); document.AddCell(report.DateViewed.ToDateTimeString()); WriteToResponse(document.WriteToStream(), report.ExportFileName); } }
public override void Export() { AgedBalancesReport report = ViewState["AgedBalancesReport"] as AgedBalancesReport; System.Collections.Generic.IList <AgedBalancesReportRecord> exportRecordWithNotes = new System.Collections.Generic.List <AgedBalancesReportRecord>(); foreach (AgedBalancesReportRecord rptRecord in report.Records) { System.Collections.Generic.IList <CustomerNote> cnList = rptRecord.CustNoteList; rptRecord.Note = ""; foreach (CustomerNote cNote in cnList) { if (!string.IsNullOrEmpty(cNote.Comment)) { rptRecord.Note += "[" + cNote.CreatedByEmployeeName + "][" + cNote.Created.ToShortDateString() + "]"; rptRecord.Note += cNote.Comment + System.Environment.NewLine; } } if (!string.IsNullOrEmpty(rptRecord.Note)) { rptRecord.CustNoteList.Clear(); } exportRecordWithNotes.Add(rptRecord); } //init columns CffGenGridView exportGrid = this.reportGridView; if (this.isReportWithNotes) { exportGrid.AllowSorting = true; exportGrid.SetSortExpression = "CustomerName"; exportGrid.InsertDataColumn("Customer", "CustomerName"); exportGrid.InsertCurrencyColumn("Current", "CurrentBalance"); exportGrid.InsertCurrencyColumn("Month 1", "MonthOldBalance"); exportGrid.InsertCurrencyColumn("Month 2", "TwoMonthsOldBalance"); exportGrid.InsertCurrencyColumn("Month 3+", "ThreeMonthsOrOlderBalance"); exportGrid.InsertCurrencyColumn("Balance", "Balance"); exportGrid.InsertDataColumn("Next Call", "NextCallDate", CffGridViewColumnType.Date, "10%", "cffGGV_centerAlignedCell", HorizontalAlign.Center, HorizontalAlign.Center, true); exportGrid.InsertDataColumn("Note", "Note"); exportGrid.Visible = false; exportGrid.InsertDataColumn("Email", "Email"); exportGrid.InsertDataColumn("Contact", "Contact"); exportGrid.InsertDataColumn("Phone", "Phone"); exportGrid.InsertDataColumn("Mobile Phone", "Cell"); exportGrid.TotalsSummarySettings.SetColumnTotals("CurrentBalance, MonthOldBalance, TwoMonthsOldBalance, ThreeMonthsOrOlderBalance, Balance"); exportGrid.CustomFooterSettings = CffCustomFooterMode.ShowTotals | CffCustomFooterMode.DefaultSettings; exportGrid.DataSource = exportRecordWithNotes; exportGrid.DataBind(); } if (report != null) { ExcelDocument document = new ExcelDocument(); document._HSFFGetSheet.SetColumnWidth(8, 400); document.WriteTitle(report.Title); if (IsReportWithNotesLiteral.Text.ToLower() == "true") { exportGrid.WriteToExcelDocument(document); } else { reportGridView.WriteToExcelDocument(document); } 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); } }
public override void Export() { AgedBalancesReport report = ViewState["AgedBalancesReport"] as AgedBalancesReport; System.Collections.Generic.IList <AgedBalancesReportRecord> exportRecordWithNotes = new System.Collections.Generic.List <AgedBalancesReportRecord>(); foreach (AgedBalancesReportRecord rptRecord in report.Records) { System.Collections.Generic.IList <CustomerNote> cnList = rptRecord.CustNoteList; rptRecord.Note = ""; foreach (CustomerNote cNote in cnList) { if (!string.IsNullOrEmpty(cNote.Comment)) { rptRecord.Note += "[" + cNote.CreatedByEmployeeName + "][" + cNote.Created.ToShortDateString() + "]"; rptRecord.Note += cNote.Comment + System.Environment.NewLine; } } if (!string.IsNullOrEmpty(rptRecord.Note)) { rptRecord.CustNoteList.Clear(); } exportRecordWithNotes.Add(rptRecord); } //init columns CffGridView exportGrid = new CffGridView(250); if (IsReportWithNotesLiteral.Text.ToLower() == "true") { exportGrid.SettingsBehavior.AllowSort = true; exportGrid.InsertRightAlignedDataColumn("CustomerNumber", "#"); exportGrid.InsertHyperlinkColumn("CustomerName", "Customer", "Id", LinkHelper.NavigateUrlFormatToDashboardForCustomer); exportGrid.InsertCurrencyColumn("CurrentBalance", "Current"); exportGrid.InsertCurrencyColumn("MonthOldBalance", "Month 1"); exportGrid.InsertCurrencyColumn("TwoMonthsOldBalance", "Month 2"); exportGrid.InsertCurrencyColumn("ThreeMonthsOrOlderBalance", "Month 3+"); exportGrid.InsertCurrencyColumn("Balance"); exportGrid.InsertDataColumn("NextCallDate", "Next Call"); exportGrid.InsertMemoColumn("Note", "Note"); exportGrid.Visible = false; exportGrid.InsertDataColumn("Email"); exportGrid.InsertDataColumn("Contact"); exportGrid.InsertDataColumn("Phone"); exportGrid.InsertDataColumn("Cell", "Mobile Phone"); exportGrid.TotalSummary.Clear(); exportGrid.InsertTotalSummaryLabelColumn(0); exportGrid.InsertTotalSummarySumColumn("CurrentBalance"); exportGrid.InsertTotalSummarySumColumn("MonthOldBalance"); exportGrid.InsertTotalSummarySumColumn("TwoMonthsOldBalance"); exportGrid.InsertTotalSummarySumColumn("ThreeMonthsOrOlderBalance"); exportGrid.InsertTotalSummarySumColumn("Balance"); exportGrid.DataSource = exportRecordWithNotes; exportGrid.DataBind(); } if (report != null) { ExcelDocument document = new ExcelDocument(); document.HSFFGetSheet.SetColumnWidth(8, 400); document.WriteTitle(report.Title); Hashtable hashtable = new Hashtable(); hashtable.Add("Client", "ClientName"); hashtable.Add("Customer", "CustomerName"); if (IsReportWithNotesLiteral.Text.ToLower() == "true") { exportGrid.WriteToExcelDocumentWithReplaceField(document, hashtable); } else { reportGridView.WriteToExcelDocumentWithReplaceField(document, hashtable); } document.MoveToNextRow(); document.MoveToNextRow(); document.AddCell("Date Viewed"); document.AddCell(report.DateViewed.ToDateTimeString()); WriteToResponse(document.WriteToStream(), report.ExportFileName); } }