public static System.Data.DataSet LoadProperties(ReportsTypes type) { DataSet result = new DataSet(); result.ReadXml(@"..\..\TestData\" + type.ToString() + ".xml"); return(result); }
public static string EnsureDeletion(ReportsTypes type) { string fileName = GetFileName(type); if (File.Exists(fileName)) { File.Delete(fileName); } return(fileName); }
public static void ProcessReport(BaseReport report, ReportsTypes type) { report.ReportCaption = report.ReportCaption ?? "Automate Created Report"; ProfileHelper.Start(); using (new SessionScope()) { ArHelper.WithSession(s => { report.Session = s; report.CheckEmptyData = false; report.Write(EnsureDeletion(type)); }); } ProfileHelper.Stop(); }
public static string GetFileName(ReportsTypes type) { return(Path.GetFullPath(type.ToString() + ".xls")); }