public ActionResult Pagination(string pageNumbre,string path) { var model = new ReportConfigurationModel(); model.CurrentReport = ConfigurationModel.GetReportConfiguration(path, true); model.CurrentReport.CurrentPage = int.Parse( pageNumbre) - 1; AggregationQueryProcessing.BuildAggregationPiplineFrameWorkQuery(model.CurrentReport); return RedirectToAction("ListReport", new { path = path }); }
public ActionResult ReportDetails(string path) { ViewBag.Message = "Your contact page."; var model = new ReportConfigurationModel(); model.CurrentReport = ConfigurationModel.GetReportConfiguration(path, true); return View(model); }
public ActionResult Filter(FormCollection form) { var model = new ReportConfigurationModel(); var path = form["path"].Replace(",",""); model.CurrentReport = ConfigurationModel.GetReportConfiguration(path); model.CurrentReport.CurrentPage = 0; model.CurrentReport.PageCount = 0; model.CurrentReport.ResultCount = 0; model.CurrentReport.Grid.ResultSet = null; model.CurrentReport.Grid.ExcelResultSet = null; foreach (var filter in form.AllKeys) { model.CurrentReport.FilterDataValue[filter] = form[filter]; } AggregationQueryProcessing.BuildAggregationPiplineFrameWorkQuery(model.CurrentReport); return RedirectToAction("ListReport", new { path= path }); }
public ActionResult ExcelExport(string file,string path) { var model = new ReportConfigurationModel(); model.CurrentReport = ConfigurationModel.GetReportConfiguration(path, true); AggregationQueryProcessing.ExcelExport(model.CurrentReport); // instantiate the GridView control from System.Web.UI.WebControls namespace // set the data source GridView gridview = new GridView(); gridview.DataSource = model.CurrentReport.Grid.ExcelResultSet; gridview.DataBind(); // Clear all the content from the current response Response.ClearContent(); Response.Buffer = true; // set the header Response.AddHeader("content-disposition", string.Format( "attachment;filename = {0}",model.CurrentReport.ExcelExportFileName)); Response.ContentType = "application/ms-excel"; Response.Charset = ""; // create HtmlTextWriter object with StringWriter using (StringWriter sw = new StringWriter()) { using (HtmlTextWriter htw = new HtmlTextWriter(sw)) { // render the GridView to the HtmlTextWriter gridview.RenderControl(htw); // Output the GridView content saved into StringWriter Response.Output.Write(sw.ToString()); Response.Flush(); Response.End(); } } return RedirectToAction("ListReport", new { path = path }); }
public ActionResult DrawChart(string path) { var model = new ReportConfigurationModel(); //model.CurrentReport = ConfigurationModel.GetReportConfiguration("TransactionDetails", true); //AggregationQueryProcessing.BuildGraphicalCharts(model.CurrentReport); return View("dynamicCharts", model); }