public ActionResult GetReport(int?id) { // Create the report object StiReport report = new StiReport(); switch (id) { // Dynamic sorting case 1: report.Load(Server.MapPath("~/Content/Reports/DrillDownSorting.mrt")); break; // Drill down case 2: report.Load(Server.MapPath("~/Content/Reports/DrillDownListOfProducts.mrt")); break; // Collapsing case 3: report.Load(Server.MapPath("~/Content/Reports/DrillDownGroupWithCollapsing.mrt")); break; // Bookmarks case 4: report = new StiMasterDetail(); break; // Parameters case 5: report = new StiParametersSelectingCountryReport(); break; default: report.Load(Server.MapPath("~/Content/Reports/DrillDownSorting.mrt")); break; } // Load data from XML file for report template DataSet data = new DataSet("Demo"); data.ReadXml(Server.MapPath("~/Content/Data/Demo.xml")); report.Dictionary.Databases.Clear(); report.RegData(data); return(StiMvcViewer.GetReportResult(report)); }
public ActionResult GetReport(int?id) { // Create the report object StiReport report = new StiReport(); // Load report switch (id) { // Load report snapshot case 1: report.LoadDocument(Server.MapPath("~/Content/Reports/SimpleList.mdc")); break; // Load report template case 2: report.Load(Server.MapPath("~/Content/Reports/TwoSimpleLists.mrt")); break; // Load compiled report class case 3: report = new StiMasterDetail(); break; // Load compiled report class case 4: report = new StiParametersSelectingCountryReport(); break; // Load report snapshot default: report.LoadDocument(Server.MapPath("~/Content/Reports/SimpleList.mdc")); break; } // Load data from XML file for report template if (!report.IsDocument) { DataSet data = new DataSet("Demo"); data.ReadXml(Server.MapPath("~/Content/Data/Demo.xml")); report.RegData(data); } return(StiMvcViewerFx.GetReportResult(report)); }
public IActionResult GetReport(int id = 1) { // Create the report object var report = new StiReport(); // Load report switch (id) { // Load report snapshot case 1: report.LoadDocument(StiNetCoreHelper.MapPath(this, "Reports/SimpleList.mdc")); break; // Load report template case 2: report.Load(StiNetCoreHelper.MapPath(this, "Reports/TwoSimpleLists.mrt")); break; // Load compiled report class case 3: report = new StiMasterDetail(); break; // Load compiled report class case 4: report = new StiParametersSelectingCountryReport(); break; } // Load data from JSON file for report template if (!report.IsDocument) { var data = StiJsonToDataSetConverterV2.GetDataSetFromFile(StiNetCoreHelper.MapPath(this, "Data/Demo.json")); report.Dictionary.Databases.Clear(); report.RegData(data); } return(StiNetCoreViewer.GetReportResult(this, report)); }