public ActionResult GetReport() { // Loading the report template var reportPath = Server.MapPath("~/Content/Reports/TwoSimpleLists.mrt"); var report = new StiReport(); report.Load(reportPath); // Deleting connections in the report template report.Dictionary.Databases.Clear(); // Loading data from the XML file var dataPath = Server.MapPath("~/Content/Data/Demo.xml"); var data = new DataSet(); data.ReadXml(dataPath); // Registering data in the report report.RegData(data); // Syncing the data structure, if required //report.Dictionary.Synchronize(); return(StiMvcViewer.GetReportResult(report)); }
public ActionResult GetReportSnapshotTruck(long ProducerID, long ConsumerID, long ProduceID, string FromDate, string ToDate) { if (ProducerID != 0 || ConsumerID != 0 || ProduceID != 0 || FromDate != null || ToDate != null) { StiReport report = new StiReport(); string path = Server.MapPath("~/Reports/bi-listTruck.mrt"); report.Load(path); report.Dictionary.Databases.Clear(); string con = System.Configuration.ConfigurationManager.ConnectionStrings[Session["ReportConnection"].ToString()].ConnectionString; report.Dictionary.Databases.Add(new StiSqlDatabase("Maase", con)); //string con = System.Configuration.ConfigurationManager.ConnectionStrings["MaaseDBEntities"].ConnectionString; //report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("Maase", con)); Image img = Image.FromFile(Server.MapPath(@"~/Images/logomaster.png")); report.Compile(); string p = Server.MapPath(@"~/TFont"); report["fontPath"] = p; report["logo"] = img; String where = ""; if (ProducerID != 0) { where += " and ProducerID =" + ProducerID.ToString(); } if (ProduceID != 0) { where += " and ProduceID =" + ProduceID.ToString(); } if (ConsumerID != 0) { where += " and ConsumerID =" + ConsumerID.ToString(); } if (FromDate != null) { where += " and SUBSTRING (UnLoadDateTime,1,10) >='" + FromDate + "'"; } if (ToDate != null) { where += " and SUBSTRING (UnLoadDateTime,1,10) <='" + ToDate + "'"; } where += " and TruckID =" + db.T_Users.Where(m => m.UserName.Equals(User.Identity.Name)).ToList()[0].PublicID.ToString(); report["cnd"] = where; //report.Render(); report.Render(); return(StiMvcViewer.GetReportSnapshotResult(report)); } else { return(RedirectToAction("index")); } }
public ActionResult getsnapshotviwer() { if (Convert.ToInt32(Session["TA_TahvilType"]) == 1) { DataLayer.AtsTotalNewDataContext context = new DataLayer.AtsTotalNewDataContext(); Sell.Contract.Report repo = new Sell.Contract.Report(); var TA_Recevier = Convert.ToInt32(Session["TA_Recevier"]); var model = repo.GetGhateiDeliveredReport(1, Convert.ToInt32(Session["TA_RecevierType"]), "", Session["TA_FromDate"].ToString(), Session["TA_ToDate"].ToString(), TA_Recevier); StiReport stireport2 = new StiReport(); stireport2.RegBusinessObject("AmaniDeliverdCar", model); stireport2.Load(Server.MapPath("/Content/report/AmaniDeliverdCar.mrt")); stireport2.Dictionary.Variables["FRomDate"].Value = BAL.StaticData.DateNow.Date; stireport2.Dictionary.Variables["FromTime"].Value = BAL.StaticData.DateNow.Time; return(StiMvcViewer.GetReportSnapshotResult(this.HttpContext, stireport2)); } else { DataLayer.AtsTotalNewDataContext context = new DataLayer.AtsTotalNewDataContext(); Sell.Contract.Report repo = new Sell.Contract.Report(); var TA_Recevier = Convert.ToInt32(Session["TA_Recevier"]); var model = repo.GetGhateiDeliveredReport(0, Convert.ToInt32(Session["TA_RecevierType"]), "", Session["TA_FromDate"].ToString(), Session["TA_ToDate"].ToString(), TA_Recevier); StiReport stireport2 = new StiReport(); stireport2.RegBusinessObject("GhatiDeliveredReport", model); stireport2.Load(Server.MapPath("/Content/report/ghatii.mrt")); stireport2.Dictionary.Variables["FRomDate"].Value = BAL.StaticData.DateNow.Date; //stireport2.Dictionary.Variables["FromTime"].Value = BAL.StaticData.DateNow.Time; return(StiMvcViewer.GetReportSnapshotResult(this.HttpContext, stireport2)); } }
public ActionResult GetReportSnapshot1(long id = 0) { if (id != 0) { StiReport report = new StiReport(); string path = Server.MapPath("~/Reports/pfs-factor.mrt"); report.Load(path); report.Dictionary.Databases.Clear(); string con = System.Configuration.ConfigurationManager.ConnectionStrings[Session["ReportConnection"].ToString()].ConnectionString; report.Dictionary.Databases.Add(new StiSqlDatabase("Maase", con)); //string con = System.Configuration.ConfigurationManager.ConnectionStrings["MaaseDBEntities"].ConnectionString; //report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("Maase", con)); Image img = Image.FromFile(Server.MapPath(@"~/Images/logomaster.png")); report.Compile(); string p = Server.MapPath(@"~/TFont"); report["fontPath"] = p; report["logo"] = img; report["PFSID"] = " where ProducerFinancialStatementID =" + id.ToString(); //report.Render(); report.Render(); return(StiMvcViewer.GetReportSnapshotResult(report)); } else { return(RedirectToAction("index")); } }
public ActionResult GetReportSnapshot() { try { if (GlobalValue.Report_Index_Id == "employee_report1") { string pa = Server.MapPath("~/Penfad_Reports/SCHEME_LEVEL_BENEFIT_SUMMARY.dll"); System.Reflection.Assembly assembly_1 = System.Reflection.Assembly.LoadFrom(pa); StiReport My_Report = StiReport.GetReportFromAssembly(assembly_1); //////asign constring My_Report.Dictionary.DataStore.Clear(); //My_Report.Dictionary.Databases.Add(new StiSqlDatabase("TekSolPenfad", GlobalValue.ConString)); My_Report.Dictionary.Databases.Add(new StiOracleDatabase("con", GlobalValue.ConString)); My_Report[":P_SCHEME_ID"] = GlobalValue.Report_Param_1; My_Report[":P_MAKER_ID"] = GlobalValue.User_ID; //My_Report[":P_DATE"] = GlobalValue.Report_Param_2; return(StiMvcViewer.GetReportSnapshotResult(My_Report)); } else { X.Mask.Hide(); return(this.Direct()); } } catch (Exception ex) { X.Mask.Hide(); throw ex; } }
public ActionResult GetReport(string fileName = "WIP") { Report = fileName; Repository repository = new Repository(); var report = new StiReport(); StoreService storeService = (StoreService)Ioc.Get <StoreService>(); string basePath = Server.MapPath("~/"); //string reportFolder = string.Format("{0}\\Content\\DashboardReports\\ClientId{1}", basePath, storeService.StoreId.ToString()); string reportFolder = string.Format("{0}Content\\DashboardReports", basePath); string fileNameFullPath = string.Format("{0}\\{1}.mrt", reportFolder, fileName); // var path = Server.MapPath("~/Reports/WIP.mrt"); report.Load(fileNameFullPath); try { var dbConnection = (StiSqlDatabase)report.Dictionary.Databases["Connection"]; dbConnection.ConnectionString = repository.ConnectionString; report.Dictionary.Variables["Clientid"].ValueObject = storeService.StoreId.ToString(); report.Dictionary.Variables["BaseUrl"].ValueObject = Request.Url.Scheme + "://" + Request.Url.Authority; } catch { } return(StiMvcViewer.GetReportResult(report)); }
public ActionResult GetReportSnapshot() { try { if (GlobalValue.Report_Index_Id == "SCHEME_BENEFIT_SUMMARY") { string pa = Server.MapPath("~/Penfad_Reports/SCHEME_BENEFIT_SUMMARY.dll"); System.Reflection.Assembly assembly_1 = System.Reflection.Assembly.LoadFrom(pa); StiReport My_Report = StiReport.GetReportFromAssembly(assembly_1); //////asign constring My_Report.Dictionary.DataStore.Clear(); //My_Report.Dictionary.Databases.Add(new StiSqlDatabase("TekSolPenfad", GlobalValue.ConString)); My_Report.Dictionary.Databases.Add(new StiOracleDatabase("con", GlobalValue.ConString)); //My_Report[":P_ES_ID"] = GlobalValue.Report_Param_1; // GlobalValue.Rep_Cust_No; //My_Report.Dictionary.DataSources["con"].Parameters["P_CUSTNO"].Value = GlobalValue.Rep_Cust_No; return(StiMvcViewer.GetReportSnapshotResult(My_Report)); } { return(this.Direct()); } } catch (Exception ex) { string ssss = ex.ToString(); return(this.Direct()); } }
public ActionResult GetReportSnapshot() { try { if (GlobalValue.Report_Index_Id == "employee_List") { string pa = Server.MapPath("~/Penfad_Reports/Employee_List.dll"); System.Reflection.Assembly assembly_1 = System.Reflection.Assembly.LoadFrom(pa); StiReport My_Report = StiReport.GetReportFromAssembly(assembly_1); //////asign constring My_Report.Dictionary.DataStore.Clear(); //My_Report.Dictionary.Databases.Add(new StiSqlDatabase("TekSolPenfad", GlobalValue.ConString)); My_Report.Dictionary.Databases.Add(new StiOracleDatabase("con", GlobalValue.ConString)); return(StiMvcViewer.GetReportSnapshotResult(My_Report)); } { return(this.Direct()); } } catch (Exception ex) { string ssss = ex.ToString(); return(this.Direct()); } }
public ActionResult GetReportSnapshot() { try { if (GlobalValue.Report_Index_Id == "employee_report1") { string pa = Server.MapPath("~/Penfad_Reports/Employee_List_per_Scheme_Salary.dll"); System.Reflection.Assembly assembly_1 = System.Reflection.Assembly.LoadFrom(pa); StiReport My_Report = StiReport.GetReportFromAssembly(assembly_1); //////asign constring My_Report.Dictionary.DataStore.Clear(); My_Report.Dictionary.Databases.Add(new StiOracleDatabase("con", GlobalValue.ConString)); My_Report[":P_SCHEME_ID"] = GlobalValue.Report_Param_1; //My_Report[":P_DATE"] = GlobalValue.Report_Param_2; return(StiMvcViewer.GetReportSnapshotResult(My_Report)); } //} else { return(this.Direct()); } } catch (Exception ex) { string ssss = ex.ToString(); return(this.Direct()); } }
public ActionResult GetReport(string fileName) { StoreService storeService = (StoreService)Ioc.Get <StoreService>(); string file, basePath = Server.MapPath("~/"); string reportFolder = string.Format("{0}\\Content\\DashboardReports\\ClientId{1}", basePath, storeService.StoreId.ToString()); StiReport report = new StiReport(); if (!string.IsNullOrEmpty(fileName)) { file = string.Format("{0}\\{1}.mrt", reportFolder, fileName); } else if (Directory.Exists(reportFolder)) { string[] files = Directory.GetFiles(reportFolder, "*.mrt"); file = files.Length == 0 ? null : files[0]; } else { file = null; } if (file != null) { report.Load(file); StiCacheCleaner.Clean(); report.Dictionary.Synchronize(); report.Dictionary.SynchronizeBusinessObjects(); } return(StiMvcViewer.GetReportResult(report)); }
public ActionResult GetReport() { var appPath = Server.MapPath("~/"); var dashboard = Helpers.Dashboard.CreateTemplate(appPath); return(StiMvcViewer.GetReportResult(dashboard)); }
public ActionResult GetReport() { try { Database db = new Database(); var userid = int.Parse(Session["userid"].ToString()); var currentUser = db.tbl_users.Where(u => u.Id == userid).FirstOrDefault(); var year = int.Parse(Request.QueryString["y"]); var month = int.Parse(Request.QueryString["m"]); var bakhshId = int.Parse(Request.QueryString["a"]); var sematId = int.Parse(Request.QueryString["p"]); var checklist = db.tbl_checklist.Where(x => x.year == year && x.month == month && x.bakhshId == bakhshId && x.sematId == sematId ).ToList(); if (!currentUser.admin && currentUser.anbarId != currentUser.anbarId) { return(null); } var report = new StiReport(); var path = Server.MapPath("~/reports/arzyabi.mrt"); report.Load(path); report.Dictionary.Variables.Add("date", tools.toShamsiMonthName(month) + " " + year.ToString()); var dt = new DataTable("DataSource1"); dt.Columns.Add("row"); dt.Columns.Add("question"); dt.Columns.Add("name"); dt.Columns.Add("rate"); for (int i = 0; i < checklist.Count; i++) { var rate = (int)checklist[i].rate; var pid = checklist[i].personId; var qid = checklist[i].questionId; var person = db.tbl_personel.Where(x => x.id == pid).FirstOrDefault(); var question = db.tbl_question.Where(x => x.id == qid).FirstOrDefault(); dt.Rows.Add(i + 1, question.question, person.name + " " + person.family, checklist[i].rate); } var dataSet = new DataSet("DataSource1"); dataSet.Tables.Add(dt); report.RegData(dataSet); return(StiMvcViewer.GetReportSnapshotResult(report)); } catch (Exception ex) { return(null); } }
public ActionResult PrintReport() { var report = StiMvcViewer.GetReportObject(); // Some actions with report when printing return(StiMvcViewer.PrintReportResult(report)); }
public ActionResult GetReport() { var report = new StiReport(); report.Load(Server.MapPath("~/Content/Reports/TwoSimpleLists.mrt")); return(StiMvcViewer.GetReportResult(report)); }
public ActionResult GetReport(string id) { var report = StiReport.CreateNewDashboard(); report.Load(Server.MapPath($"~/Dashboards/{id}.mrt")); return(StiMvcViewer.GetReportResult(report)); }
/// <summary> /// /// </summary> /// <returns></returns> public virtual async Task <ActionResult> DetailPrintReport() { StiReport report = StiMvcViewer.GetReportObject(); // Some actions with report when printing return(StiMvcViewer.PrintReportResult(report)); }
public ActionResult GetReport() { StiReport report = new StiReport(); report.LoadDocument(Server.MapPath("~/Content/Reports/SimpleList.mdc")); return(StiMvcViewer.GetReportResult(report)); }
public ActionResult GetReportSnapshotCheques(long TruckID, int PayStateID, int PayTypeID, string FromDate, string ToDate) { StiReport report = new StiReport(); string path = Server.MapPath("~/Reports/tfs-pay-cheque.mrt"); report.Load(path); report.Dictionary.Databases.Clear(); string con = System.Configuration.ConfigurationManager.ConnectionStrings[Session["ReportConnection"].ToString()].ConnectionString; report.Dictionary.Databases.Add(new StiSqlDatabase("Maase", con)); //string con = System.Configuration.ConfigurationManager.ConnectionStrings["MaaseDBEntities"].ConnectionString; //report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("Maase", con)); Image img = Image.FromFile(Server.MapPath(@"~/Images/logomaster.png")); report.Compile(); string p = Server.MapPath(@"~/TFont"); report["fontPath"] = p; report["logo"] = img; String where = ""; if (PayStateID != 0) { where += " and PayStateID =" + PayStateID.ToString(); } if (TruckID != 0) { where += " and TruckID =" + TruckID.ToString(); } if (PayTypeID != 0) { where += " and PayTypeID =" + PayTypeID.ToString(); } if (FromDate != null) { where += " and SUBSTRING (PayDate,1,10) >='" + FromDate + "'"; } if (ToDate != null) { where += " and SUBSTRING (PayDate,1,10) <='" + ToDate + "'"; } report["condition"] = where; report["FromDate"] = FromDate; report["ToDate"] = ToDate; //report.Render(); report.Render(); return(StiMvcViewer.GetReportSnapshotResult(report)); }
public ActionResult PrintExamInPersonCertificate() { var report = new StiReport(); report.Load(Server.MapPath("/Reports/ExamInPersonCertificate.mrt")); report.Compile(); report.RegBusinessObject("dt", data); return(StiMvcViewer.GetReportSnapshotResult(report)); }
public ActionResult Exam() { var report = new StiReport(); report.Load(Server.MapPath("/Content/Reports/Report.mrt")); report.Compile(); report.RegBusinessObject("dt", new ESLEntities().Tbl_Menu.ToList()); return(StiMvcViewer.GetReportSnapshotResult(report)); }
public ActionResult GetReportSnapshot() { try { if (GlobalValue.Report_Index_Id == "employee_report1") { string pa = Server.MapPath("~/Penfad_Reports/MM_TBILL_BOND_COUPON.dll"); System.Reflection.Assembly assembly_1 = System.Reflection.Assembly.LoadFrom(pa); StiReport My_Report = StiReport.GetReportFromAssembly(assembly_1); //////asign constring My_Report.Dictionary.DataStore.Clear(); //My_Report.Dictionary.Databases.Add(new StiSqlDatabase("TekSolPenfad", GlobalValue.ConString)); My_Report.Dictionary.Databases.Add(new StiOracleDatabase("con", GlobalValue.ConString)); My_Report[":P_SF_ID"] = GlobalValue.Report_Param_1; My_Report[":P_DATE"] = GlobalValue.Report_Param_2; My_Report[":P_DATE2"] = GlobalValue.Report_Param_1_date; X.Mask.Hide(); //My_Report.Dictionary.DataSources["con"].Parameters["P_CUSTNO"].Value = GlobalValue.Rep_Cust_No; return(StiMvcViewer.GetReportSnapshotResult(My_Report)); } else if (GlobalValue.Report_Index_Id == "employee_report2") { string pa = Server.MapPath("~/Penfad_Reports/EC_PV.dll"); System.Reflection.Assembly assembly_1 = System.Reflection.Assembly.LoadFrom(pa); StiReport My_Report = StiReport.GetReportFromAssembly(assembly_1); //////asign constring My_Report.Dictionary.DataStore.Clear(); //My_Report.Dictionary.Databases.Add(new StiSqlDatabase("TekSolPenfad", GlobalValue.ConString)); My_Report.Dictionary.Databases.Add(new StiOracleDatabase("con", GlobalValue.ConString)); My_Report[":P_SF_ID"] = GlobalValue.Report_Param_1; My_Report[":P_DATE"] = GlobalValue.Report_Param_2; My_Report[":P_DATE2"] = GlobalValue.Report_Param_1_date; X.Mask.Hide(); return(StiMvcViewer.GetReportSnapshotResult(My_Report)); } else { X.Mask.Hide(); return(this.Direct()); } } catch (Exception ex) { X.Mask.Hide(); string ssss = ex.ToString(); return(this.Direct()); } }
public ActionResult ViewerEvent() { //Automation.Reciever.Reciever reciv = new Automation.Reciever.Reciever(); //var reciv2 = reciv.GetAllList(); //StiReport stireport2 = new StiReport(); //stireport2.RegBusinessObject("RecieverModel", reciv2); //stireport2.Load("Content\report\bReport.mrt"); return(StiMvcViewer.ViewerEventResult(HttpContext)); }
public ActionResult report() { var report = new StiReport(); report.Load(Server.MapPath("/Reports/Report.mrt")); report.Compile(); report.RegBusinessObject("dt", db.FactorDetails.ToList()); return(StiMvcViewer.GetReportSnapshotResult(report)); }
public ActionResult GetReportSnapshotViewer() { StiReport report = new StiReport(); string path = Server.MapPath("~/App_Data/Reports/ApprovalSheet.mrt"); report.Load(path); report.Compile(); report.CompiledReport.DataSources[0].Parameters[0].ParameterValue = 1024; return(StiMvcViewer.GetReportSnapshotResult(report)); }
public ActionResult GetReportIEnumerable() { var report = new StiReport(); report.Load(Server.MapPath("~/Content/Reports/BusinessObjects_IEnumerable.mrt")); report.RegData("EmployeeIEnumerable", CreateBusinessObjectsIEnumerable.GetEmployees()); CheckReference(report); return(StiMvcViewer.GetReportResult(report)); }
public ActionResult GetReportITypedList() { StiReport report = new StiReport(); report.Load(Server.MapPath("~/Content/Reports/BusinessObjects_ITypedList.mrt")); report.RegData("EmployeeITypedList", CreateBusinessObjectsITypedList.GetEmployees()); CheckReference(report); return(StiMvcViewer.GetReportResult(report)); }
public ActionResult GetReport(string id = "DashboardChristmas") { // Create the dashboard object var report = StiReport.CreateNewDashboard(); // Load dashboard template report.Load(Server.MapPath($"~/Dashboards/{id}.mrt")); // Return template to the Viewer return(StiMvcViewer.GetReportResult(report)); }
public ActionResult GetReportITypedListBO() { var report = new StiReport(); report.Load(Server.MapPath("~/Content/Reports/BusinessObjects_ITypedList_BO.mrt")); report.RegBusinessObject("EmployeeITypedList", CreateBusinessObjectsITypedList.GetEmployees()); report.Dictionary.SynchronizeBusinessObjects(2); CheckReference(report); return(StiMvcViewer.GetReportResult(report)); }
public ActionResult LoadExitReportSnapshot() { Guid exitId = new Guid(TempData["exitId"].ToString()); var report = new StiReport(); report.Load(Server.MapPath("~/Reports/MRT/ExitReport.mrt")); report.RegBusinessObject("ExitReport", GetExit(exitId)); // report.Dictionary.Variables.Add("today", DateTime.Today()); return(StiMvcViewer.GetReportResult(report)); }
public ActionResult ExportReport() { //var report = StiMvcViewer.GetReportObject(); //var parameters = StiMvcViewer.GetRequestParams(); //if (parameters.ExportFormat == StiExportFormat.Pdf) //{ // // Some actions with report when exporting to PDF //} return(StiMvcViewer.ExportReportResult(this.HttpContext)); }