public override void MontaCorpoDadosEvento() { EvActivoPasivoDAO evDAO = new EvActivoPasivoDAO(); base.MontaCorpoDadosEvento(); #region Cabeçalho do Relatório PdfPTable table = new PdfPTable(2); BaseColor preto = new BaseColor(0, 0, 0); BaseColor fundo = new BaseColor(200, 200, 200); Font font = FontFactory.GetFont("Verdana", 8, Font.NORMAL, preto); Font titulo = FontFactory.GetFont("Verdana", 8, Font.BOLD, preto); float[] colsW = { 10, 10 }; table.SetWidths(colsW); table.HeaderRows = 1; table.WidthPercentage = 100f; table.DefaultCell.Border = PdfPCell.BOTTOM_BORDER; table.DefaultCell.BorderColor = preto; table.DefaultCell.BorderColorBottom = new BaseColor(255, 255, 255); table.DefaultCell.Padding = 10; table.AddCell(getNewCell("Descripción", titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER, preto, fundo)); table.AddCell(getNewCell("Tipo", titulo, Element.ALIGN_LEFT, 10, PdfPCell.BOTTOM_BORDER, preto, fundo)); #endregion var eventos = evDAO.ListarTodosEventos(); var clienteOld = string.Empty; string descEv = ""; foreach (var ev in eventos) { if (ev.TipoEvento == "C") { descEv = "Credito"; } else { descEv = "Debito"; } table.AddCell(getNewCell(ev.DescEvento, font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER)); table.AddCell(getNewCell(descEv, font, Element.ALIGN_LEFT, 5, PdfPCell.BOTTOM_BORDER)); } doc.Add(table); }