public byte[] GeneratePayIn(long documentID) { DocumentReportName report = ScgeAccountingQueryProvider.SCGDocumentQuery.GetReportNameByDocumentID(documentID); List <ReportParameter> param = new List <ReportParameter>(); ReportParameter param1 = new ReportParameter(); param1.ParamterName = "DocumentID"; param1.ParamterValue = documentID.ToString(); param.Add(param1); FilesGenerator rp = new FilesGenerator(); byte[] results = rp.GetByte(ParameterServices.ReportingURL, ParameterServices.ReportUserName, ParameterServices.ReportPassword, ParameterServices.ReportDomainName, ParameterServices.ReportFolderPath, "PayInReport", param, FilesGenerator.ExportType.PDF); //byte[] results = rp.GetByte("http://172.20.56.116:81/ReportServer/ReportExecution2005.asmx", "RSeAccounting", "p@ssw0rd", "SCG-EACCOUNTING", "eAccountingReports", report.ReportName, param, FilesGenerator.ExportType.PDF); return(results); }
public byte[] GeneratePDF(long documentID) { DocumentReportName report = ScgeAccountingQueryProvider.SCGDocumentQuery.GetReportNameByDocumentID(documentID); List <ReportParameter> param = new List <ReportParameter>(); ReportParameter param1 = new ReportParameter(); //Hard code for parameter name. if (report.ReportName == "AVReportDomestic") { param1.ParamterName = "AdvanceID"; } else if (report.ReportName == "AVReportForeign") { param1.ParamterName = "AdvanceID"; } else if (report.ReportName == "TAReport") { param1.ParamterName = "TADocID"; } else if (report.ReportName == "RMTADVReport") { param1.ParamterName = "RemittanceID"; } else if (report.ReportName == "AdvReimbursementDomestic") { param1.ParamterName = "expenseId"; } else if (report.ReportName == "PettyCashReimbursementDM") { param1.ParamterName = "expenseId"; } else if (report.ReportName == "AdvReimbursementForeign") { param1.ParamterName = "expenseId"; } else if (report.ReportName == "PettyCashReimbursementFR") { param1.ParamterName = "expenseId"; } else if (report.ReportName == "MPADocumentPrintForm") { param1.ParamterName = "MPADocumentID"; } else if (report.ReportName == "CADocumentPrintForm") { param1.ParamterName = "CADocumentID"; } else if (report.ReportName == "FixedAdvanceDocumentPrintForm") { param1.ParamterName = "DocumentID"; } else { return(null); } param1.ParamterValue = report.ReportParam; param.Add(param1); FilesGenerator rp = new FilesGenerator(); byte[] results = rp.GetByte(ParameterServices.ReportingURL, ParameterServices.ReportUserName, ParameterServices.ReportPassword, ParameterServices.ReportDomainName, ParameterServices.ReportFolderPath, report.ReportName, param, FilesGenerator.ExportType.PDF); //byte[] results = rp.GetByte("http://172.20.56.116:81/ReportServer/ReportExecution2005.asmx", "RSeAccounting", "p@ssw0rd", "SCG-EACCOUNTING", "eAccountingReports", report.ReportName, param, FilesGenerator.ExportType.PDF); return(results); }