string sPDFReportFile = "Payslip-" + _common.Utility.ToString(cmbMonth.Items[cmbMonth.SelectedIndex].Value) + Utility.ToString(cmbYear.Items[cmbYear.SelectedIndex].Value) + "-" + _common.Utility.ToString(Session.SessionID) + "." + Utility.ToString(filetype).Trim(); CrystalDecisions.Shared.DiskFileDestinationOptions dfdoReport = new CrystalDecisions.Shared.DiskFileDestinationOptions(); dfdoReport.DiskFileName = Request.PhysicalApplicationPath + @"TempReports\" + sPDFReportFile; ReportDoc.ExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile; if (filetype == "doc") ReportDoc.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.RichText; else if (filetype == "pdf") ReportDoc.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat; ReportDoc.ExportOptions.DestinationOptions = dfdoReport; ReportDoc.Export(); ReportDoc.Close(); ReportDoc.Dispose(); return Utility.ToString(sPDFReportFile);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)