//individual report sections // Summary version private void SummaryReportHeader(PdfPTable headingtable, Image gif) { PdfPCell cell = new PdfPCell(); // heading - row 1 cell = new PdfPCell(gif); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_LEFT; cell.VerticalAlignment = Element.ALIGN_TOP; cell.PaddingLeft = -10; cell.Colspan = 5; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(string.Empty, _reportFont)); cell.Border = Rectangle.NO_BORDER; //PWN00000407 SMurphy 3/25/2010 - Store name & Run Date overlapped cell.Colspan = 5; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(reportObject.ReportStoreDesc, _reportFont)); cell.Border = Rectangle.NO_BORDER; //PWN00000407 SMurphy 3/25/2010 - Store name & Run Date overlapped cell.HorizontalAlignment = Element.ALIGN_RIGHT; cell.VerticalAlignment = Element.ALIGN_TOP; cell.Colspan = 11; headingtable.AddCell(cell); // heading - row 2 cell = new PdfPCell(new Paragraph(ReportHeaders.OPERATIONAL, _reportFont)); cell.Border = Rectangle.NO_BORDER; //cell.PaddingTop = -5; cell.HorizontalAlignment = Element.ALIGN_LEFT; cell.VerticalAlignment = Element.ALIGN_TOP; cell.Colspan = 5; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(string.Empty, _reportFontLargeBold)); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_CENTER; cell.Colspan = 11; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(ReportHeaders.RUNDATE + DateTime.Now.ToString("MM/dd/yyyy"), _reportFont)); //PWN00000407 SMurphy 3/25/2010 - Store name & Run Date overlapped cell.HorizontalAlignment = Element.ALIGN_RIGHT; //cell.PaddingTop = -15; cell.Border = Rectangle.NO_BORDER; cell.Colspan = 5; headingtable.AddCell(cell); // heading - row 3 cell = new PdfPCell(new Paragraph(ReportHeaders.REPORTINGCOLON + ReportHeaders.NA, _reportFont)); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_LEFT; cell.Colspan = 5; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(string.Empty, _reportFontLargeBold)); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_CENTER; cell.Colspan = 11; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(ReportHeaders.REPORTNUM + reportObject.ReportNumber.ToString(), _reportFont)); //PWN00000407 SMurphy 3/25/2010 - Store name & Run Date overlapped cell.HorizontalAlignment = Element.ALIGN_RIGHT; //cell.PaddingTop = -8; cell.Border = Rectangle.NO_BORDER; cell.Colspan = 5; headingtable.AddCell(cell); // heading - row 4 cell = new PdfPCell(new Phrase(reportObject.ReportTitle, _reportFontLargeBold)); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_CENTER; cell.Colspan = 21; headingtable.AddCell(cell); // heading - row 5 cell = new PdfPCell(new Phrase(ReportHeaders.REPORTDETAIL + reportObject.ReportDetail, _reportFont)); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_CENTER; cell.Colspan = 21; headingtable.AddCell(cell); for (int i = 0; i < 3; i++) { runReport.ReportLines(headingtable, false, StringUtilities.fillString(" ", 81), false, _reportFont); } runReport.ReportLines(headingtable, false, StringUtilities.fillString("=", 81), false, _reportFont); }
private void ReportSummary(PdfPTable summaryTable) { int totalInventory = 0; decimal totalAmtInventory = 0.0m; totalInventory = totalQtySellableInventory + totalBuy + totalHolds + totalLayaway; totalAmtInventory = totalAmtSellableInventory + totalAmtBuy + totalAmtHolds + totalAmtLayaway; PdfPCell cell = new PdfPCell(); cell = new PdfPCell(new Paragraph("Summary", _reportFontLargeBold)); //cell = new PdfPCell(new Phrase("Summary", _reportFontUnderlined)); cell.Colspan = 1; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); runReport.ReportLines(summaryTable, false, " ", false, _reportFont); //sellable Inventory cell = new PdfPCell(new Paragraph("Sellable Inventory", _reportFont)); cell.Colspan = 2; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); cell = new PdfPCell(new Paragraph("" + totalQtySellableInventory, _reportFont)); cell.Colspan = 1; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); cell = new PdfPCell(new Paragraph("$" + totalAmtSellableInventory, _reportFont)); cell.Colspan = 1; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); runReport.ReportLines(summaryTable, false, " ", false, _reportFont); //BUY cell = new PdfPCell(new Paragraph("Buy", _reportFont)); cell.Colspan = 2; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); cell = new PdfPCell(new Paragraph("" + totalBuy, _reportFont)); cell.Colspan = 1; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); cell = new PdfPCell(new Paragraph("$" + totalAmtBuy, _reportFont)); cell.Colspan = 1; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); // 12/2/2010 Tracy runReport.ReportLines(summaryTable, false, " ", false, _reportFont); //LAYAWAY cell = new PdfPCell(new Paragraph("Layaway", _reportFont)); cell.Colspan = 2; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); cell = new PdfPCell(new Paragraph("" + totalLayaway, _reportFont)); cell.Colspan = 1; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); cell = new PdfPCell(new Paragraph("$" + totalAmtLayaway, _reportFont)); cell.Colspan = 1; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); //--------------- runReport.ReportLines(summaryTable, false, " ", false, _reportFont); //HOLDS cell = new PdfPCell(new Paragraph("Holds", _reportFont)); cell.Colspan = 2; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); cell = new PdfPCell(new Paragraph("" + totalHolds, _reportFont)); cell.Colspan = 1; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); cell = new PdfPCell(new Paragraph("$" + totalAmtHolds, _reportFont)); cell.Colspan = 1; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); runReport.ReportLines(summaryTable, false, " ", false, _reportFont); runReport.ReportLines(summaryTable, false, " ", false, _reportFont); //GrandTotal cell = new PdfPCell(new Paragraph("Total Inventory", _reportFont)); cell.Colspan = 2; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); cell = new PdfPCell(new Paragraph("" + totalInventory, _reportFont)); cell.Colspan = 1; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); cell = new PdfPCell(new Phrase("$" + totalAmtInventory, _reportFont)); cell.Colspan = 1; cell.HorizontalAlignment = Rectangle.ALIGN_LEFT; cell.Border = Rectangle.NO_BORDER; summaryTable.AddCell(cell); runReport.ReportLines(summaryTable, false, " ", false, _reportFont); runReport.ReportLines(summaryTable, true, "", false, _reportFont); }
private void ReportHeader(PdfPTable headingtable, Image gif) { PdfPCell cell = new PdfPCell(); // heading - row 1 cell = new PdfPCell(gif); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_LEFT; cell.VerticalAlignment = Element.ALIGN_TOP; cell.Colspan = 13; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(reportObject.ReportStoreDesc, _reportFont)); cell.Border = Rectangle.NO_BORDER; //no ticket SMurphy 3/25/2010 - Store name & Run Date overlapped cell.HorizontalAlignment = Element.ALIGN_RIGHT; cell.VerticalAlignment = Element.ALIGN_TOP; cell.Colspan = 8; headingtable.AddCell(cell); // heading - row 2 cell = new PdfPCell(new Paragraph(ReportHeaders.OPERATIONAL, _reportFont)); cell.Border = Rectangle.NO_BORDER; cell.PaddingLeft = 12; //cell.PaddingTop = -5; cell.Colspan = 18; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(ReportHeaders.RUNDATE + DateTime.Now.ToString("MM/dd/yyyy"), _reportFont)); //no ticket SMurphy 3/25/2010 - Store name & Run Date overlapped cell.HorizontalAlignment = Element.ALIGN_RIGHT; //cell.PaddingTop = -15; cell.Border = Rectangle.NO_BORDER; cell.Colspan = 3; headingtable.AddCell(cell); // heading - row 3 cell = new PdfPCell(new Paragraph(ReportHeaders.REPORTING + reportObject.ReportParms[(int)ReportEnums.STARTDATE], _reportFont)); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_LEFT; cell.PaddingLeft = 12; cell.Colspan = 18; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(ReportHeaders.REPORTNUM + reportObject.ReportNumber, _reportFont)); //no ticket SMurphy 3/25/2010 - Store name & Run Date overlapped cell.HorizontalAlignment = Element.ALIGN_RIGHT; //cell.PaddingTop = -10; cell.Border = Rectangle.NO_BORDER; cell.Colspan = 3; headingtable.AddCell(cell); // heading - row 4 cell = new PdfPCell(new Phrase(reportObject.ReportTitle + ReportHeaders.REPORT, _reportFontLargeBold)); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_CENTER; cell.Colspan = 21; headingtable.AddCell(cell); for (int i = 0; i < 3; i++) { runReport.ReportLines(headingtable, false, " ", false, _reportFont); } }
//individual report sections private void ReportHeader(PdfPTable headingtable, Image gif) { PdfPCell cell = new PdfPCell(); // heading - row 1 cell = new PdfPCell(gif); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_LEFT; cell.VerticalAlignment = Element.ALIGN_TOP; cell.PaddingLeft = -10; cell.Colspan = 5; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(string.Empty, _reportFont)); cell.Border = Rectangle.NO_BORDER; //PWN00000411 SMurphy 3/25/2010 - Store name & Run Date overlapped cell.Colspan = 5; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(reportObject.ReportStoreDesc, _reportFont)); cell.Border = Rectangle.NO_BORDER; //PWN00000411 SMurphy 3/25/2010 - Store name & Run Date overlapped cell.HorizontalAlignment = Element.ALIGN_RIGHT; cell.VerticalAlignment = Element.ALIGN_TOP; cell.Colspan = 11; headingtable.AddCell(cell); // heading - row 2 cell = new PdfPCell(new Paragraph(ReportHeaders.OPERATIONAL, _reportFont)); cell.Border = Rectangle.NO_BORDER; //cell.PaddingTop = -5; cell.HorizontalAlignment = Element.ALIGN_LEFT; cell.VerticalAlignment = Element.ALIGN_TOP; cell.Colspan = 5; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(string.Empty, _reportFontLargeBold)); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_CENTER; cell.Colspan = 11; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(ReportHeaders.RUNDATE + DateTime.Now.ToString("MM/dd/yyyy"), _reportFont)); //PWN00000411 SMurphy 3/25/2010 - Store name & Run Date overlapped cell.HorizontalAlignment = Element.ALIGN_RIGHT; //cell.PaddingTop = -15; cell.Border = Rectangle.NO_BORDER; cell.Colspan = 5; headingtable.AddCell(cell); // heading - row 3 //PWNU00000577 3/31/2010 SMurphy put in date under opertational reporting cell = new PdfPCell(new Paragraph(ReportHeaders.REPORTINGCOLON + DateTime.Now.ToString("MM/dd/yyyy"), _reportFont)); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_LEFT; cell.Colspan = 5; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(string.Empty, _reportFontLargeBold)); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_CENTER; cell.Colspan = 11; headingtable.AddCell(cell); cell = new PdfPCell(new Paragraph(ReportHeaders.REPORTNUM + reportObject.ReportNumber.ToString(), _reportFont)); //PWN00000411 SMurphy 3/25/2010 - Store name & Run Date overlapped cell.HorizontalAlignment = Element.ALIGN_RIGHT; //cell.PaddingTop = -8; cell.Border = Rectangle.NO_BORDER; cell.Colspan = 5; headingtable.AddCell(cell); // heading - row 4 cell = new PdfPCell(new Phrase(reportObject.ReportTitle, _reportFontLargeBold)); cell.Border = Rectangle.NO_BORDER; cell.HorizontalAlignment = Element.ALIGN_CENTER; cell.Colspan = 21; headingtable.AddCell(cell); for (int i = 0; i < 3; i++) { cell = new PdfPCell(new Paragraph(" ", _reportFontLargeBold)); cell.Colspan = 21; cell.Border = Rectangle.NO_BORDER; headingtable.AddCell(cell); } runReport.ReportLines(headingtable, true, string.Empty, false, _reportFont); }