public static void ReportExport(HttpResponse Response, HROne.Common.GenericReportProcess reportProcess, string reportTemplateFileName, string ExportFormat, string OutputFilenamePrefix, bool IsLocalize) { if (Response.IsClientConnected) { HROneConfig config = HROneConfig.GetCurrentHROneConfig(); HROne.Common.GenericReportProcess.UsePDFCreator = config.UsePDFCreator; if (config.UsePDFCreator) { HROne.Common.PDFCreaterPrinter.PDFCreaterPrinterName = config.PDFCreatorPrinterName; } string exportFileName = reportProcess.ReportExportToFile(reportTemplateFileName, ExportFormat, IsLocalize); string exportFileNameExtension = exportFileName.Substring(exportFileName.LastIndexOf(".")); WebUtils.TransmitFile(Response, exportFileName, OutputFilenamePrefix + "_" + AppUtils.ServerDateTime().ToString("yyyyMMddHHmmss") + exportFileNameExtension, true); } }
public static void ReportExport(HttpResponse Response, HROne.Common.GenericReportProcess reportProcess, string reportFileName, string ExportFormat, string OutputFilenamePrefix) { ReportExport(Response, reportProcess, reportFileName, ExportFormat, OutputFilenamePrefix, true); }