private void ComposeReport() { ComposeData(); // title ReportGeneration.AddTitle("Τριμηνιαία αναφορά στοιχείων απολογισμού δραστηριοτήτων Θωρηκτού «Γ. ΑΒΕΡΩΦ»"); ReportGeneration.AddEmptyLines(2); // visitors table ReportGeneration.AddNumberedIntent("ΕΠΙΣΚΕΨΕΙΣ ΟΜΑΔΙΚΕΣ-ΙΔΙΩΤΩΝ"); ReportGeneration.AddEmptyLines(1); ReportGeneration.AddElement(VisitorReportTable()); // rest ReportGeneration.AddEmptyLines(1); ReportGeneration.AddNumberedIntent("ΑΙΜΟΔΟΣΙΕΣ ΠΡΟΣΩΠΙΚΟΥ"); ReportGeneration.AddElement(new Paragraph(data[33], ReportGeneration.normalFont)); ReportGeneration.AddEmptyLines(1); ReportGeneration.AddNumberedIntent("ΣΥΜΜΕΤΟΧΗ ΑΝΤΙΠΡΟΣΩΠΕΙΩΝ ΣΕ ΤΟΠΙΚΕΣ ΕΚΔΗΛΩΣΕΙΣ"); ReportGeneration.AddElement(new Paragraph(data[34], ReportGeneration.normalFont)); ReportGeneration.AddEmptyLines(1); ReportGeneration.AddNumberedIntent("ΔΙΑΘΕΣΗ ΘΩΡΗΚΤΟΥ «Γ.ΑΒΕΡΩΦ» ΓΙΑ ΚΟΙΝΩΝΙΚΕΣ ΕΚΔΗΛΩΣΕΙΣ"); ReportGeneration.AddElement(new Paragraph(data[35], ReportGeneration.normalFont)); ReportGeneration.AddEmptyLines(1); ReportGeneration.AddNumberedIntent("ΠΟΛΙΤΙΣΤΙΚΕΣ ΔΡΑΣΤΗΡΙΟΤΗΤΕΣ ΘΩΡΗΚΤΟΥ «Γ.ΑΒΕΡΩΦ»"); ReportGeneration.AddElement(new Paragraph(data[36], ReportGeneration.normalFont)); ReportGeneration.AddEmptyLines(1); ReportGeneration.AddNumberedIntent("ΓΕΝΙΚΗ ΕΠΙΘΕΩΡΗΣΗ ΘΩΡΗΚΤΟΥ «Γ.ΑΒΕΡΩΦ»"); ReportGeneration.AddElement(new Paragraph(data[37], ReportGeneration.normalFont)); }
public override void GenerateReport() { ReportGeneration.CreatePDF(SettingsManager.Read("ExportPath") + "/WeeklyReport" + assignedDate.ToString().Replace('/', '_').Replace('\\', '_').Replace(':', '_') + ".pdf", true); ReportGeneration.OpenDoc(); ReportGeneration.AddTitle(gManager.language.WeeklyGuideSchedule); ReportGeneration.AddEmptyLines(2); { PdfPTable table = new PdfPTable(5) { WidthPercentage = 100, }; table.SetWidths(new float[] { .7f, .7f, 3, .9f, .9f }); table.AddCell(ReportGeneration.AddCell(gManager.language.Date, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont)); table.AddCell(ReportGeneration.AddCell(gManager.language.Time, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont)); table.AddCell(ReportGeneration.AddCell(gManager.language.Details, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont)); table.AddCell(ReportGeneration.AddCell(gManager.language.TourGuies, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont)); table.AddCell(ReportGeneration.AddCell(gManager.language.OfficerOnDuty, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont)); foreach (DayOfWeek day in days) { NewEntryList list = day.GetEvents(); Event e; for (int i = 0; i < list.Count(); i++) { if (i == 0) { table.AddCell(ReportGeneration.AddCell(day.header.text, 1, list.Count(), Element.ALIGN_CENTER, ReportGeneration.boldFont)); } if (list.TryGet(i, out e)) { table.AddCell(ReportGeneration.AddCell(e.startTime + " - " + e.endTime, 1, Element.ALIGN_CENTER, ReportGeneration.normalFont)); table.AddCell(ReportGeneration.AddCell(e.ToString(), 1, Element.ALIGN_CENTER, ReportGeneration.normalFont)); } if (i == 0) { table.AddCell(ReportGeneration.AddCell(day.Guides.text, 1, list.Count(), Element.ALIGN_CENTER, ReportGeneration.normalFont)); table.AddCell(ReportGeneration.AddCell(day.AF.text, 1, list.Count(), Element.ALIGN_CENTER, ReportGeneration.normalFont)); } } if (list == null || list.Count() == 0) { table.AddCell(ReportGeneration.AddCell(day.header.text, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont)); table.AddCell(ReportGeneration.AddCell("", 1, Element.ALIGN_CENTER, ReportGeneration.normalFont)); table.AddCell(ReportGeneration.AddCell("", 1, Element.ALIGN_CENTER, ReportGeneration.normalFont)); table.AddCell(ReportGeneration.AddCell(day.Guides.text, 1, Element.ALIGN_CENTER, ReportGeneration.normalFont)); table.AddCell(ReportGeneration.AddCell(day.AF.text, 1, Element.ALIGN_CENTER, ReportGeneration.normalFont)); } } ReportGeneration.AddElement(table); ReportGeneration.AddEmptyLines(1); ReportGeneration.AddElement(new Paragraph(gManager.language.ChiefOfMuseum + " " + gManager.language.NavalOfficer, ReportGeneration.titleFont)); } ReportGeneration.CloseDoc(); }
public override void GenerateReport() { ReportGeneration.CreatePDF(SettingsManager.Read("ExportPath") + "/DailyReport" + assignedDate.ToString().Replace('/', '_').Replace('\\', '_').Replace(':', '_') + ".pdf", true); ReportGeneration.OpenDoc(); ReportGeneration.AddTitle(gManager.language.DailyGuideSchedule); ReportGeneration.AddEmptyLines(2); { PdfPTable table = new PdfPTable(2) { WidthPercentage = 100, }; table.SetWidths(new float[] { .25f, 1 }); table.AddCell(ReportGeneration.AddCell(header.text, 2, Element.ALIGN_CENTER, ReportGeneration.titleFont)); table.AddCell(ReportGeneration.AddCell(gManager.language.OfficerOnDuty, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont)); table.AddCell(ReportGeneration.AddCell(info.GetOfficer(), 1, Element.ALIGN_CENTER, ReportGeneration.normalFont)); table.AddCell(ReportGeneration.AddCell(gManager.language.TourGuies, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont)); table.AddCell(ReportGeneration.AddCell(info.GetTourGuides(), 1, Element.ALIGN_CENTER, ReportGeneration.normalFont)); table.AddCell(ReportGeneration.AddCell(gManager.language.Time, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont)); table.AddCell(ReportGeneration.AddCell(gManager.language.Details, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont)); Event e; for (int i = 0; i < info.Events.Count(); i++) { if (info.Events.TryGet(i, out e)) { table.AddCell(ReportGeneration.AddCell(e.startTime + " - " + e.endTime, 1, Element.ALIGN_CENTER, ReportGeneration.normalFont)); table.AddCell(ReportGeneration.AddCell(e.ToString(), 1, Element.ALIGN_CENTER, ReportGeneration.normalFont)); } } ReportGeneration.AddElement(table); ReportGeneration.AddEmptyLines(3); ReportGeneration.AddElement(new Paragraph(gManager.language.ChiefOfMuseum + " " + gManager.language.NavalOfficer, ReportGeneration.titleFont)); } ReportGeneration.CloseDoc(); }