private void CreateReportandSaveToDB(string schoolYear, string schoolCode, string publishCycle, string GoalType, string schoolName, string schoolNameB) { string reportName = WebConfig.getValuebyKey("PublishDocumentName"); string userID = WorkingProfile.UserID; string publishDate = DateFC.YMD(DateTime.Now); Byte[] pdfReport = ReportRender.GetOneReport(reportName, userID, schoolYear, schoolCode, "1"); string result = PushToSP.PublishPLFtoSharePointSite("SLIP", pdfReport, schoolYear, schoolCode, schoolName, schoolNameB); // UploadFileToSharePointSite.PushToSite("SLIP", pdfReport, schoolYear, schoolCode, schoolName, schoolNameB); if (result == "Successful") { string action = btnReturn.Text; string signOffResult = SignOff.Signature2(action, userID, schoolYear, schoolCode, "Publish", publishDate); // SaveSLIPPublishDataToHistoryDirectory(schoolCode + ".PDF", pdfReport); errorlabel.Text = "The School PLF has been published to School Web site."; errorlabel.ForeColor = Color.Red; // PushToSP.SaveFileToHistoryFolder(WorkingProfile.SchoolYear, schoolCode + ".PDF", pdfReport); } else { errorlabel.Text = "The School PLF published failed to School Web site."; } }
public static void RenderPDF(string reportName, string userID, string schoolYear, string schoolCode, string publishCycle) { Byte[] pdfReport = ReportRender.GetOneReport(reportName, userID, schoolYear, schoolCode, publishCycle); string rFormat = WebConfig.ReportFormat(); ReportRender.RenderReport(reportName, rFormat, pdfReport); }