public void WriteReport() { ReportGeneration.CreatePDF(SettingsManager.Read("ExportPath") + "/SemesterReport.pdf", false); ReportGeneration.OpenDoc(); ComposeReport(); ReportGeneration.CloseDoc(); CalendarViewController viewController = FindObjectOfType <CalendarViewController>(); viewController.RequestView(CalendarViewController.State.MONTHLY); }
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(); }