public async Task <IActionResult> GetReport([FromQuery] T model) { //var model1 = StiNetCoreViewer.GetFormValues(this); _dataTools.SetNullStringsEmpty(model); var report = await MakeReport(model); return(await StiNetCoreViewer.GetReportResultAsync(this, report)); }
public async Task <string> MakeReport([FromBody] RepairReportDto model) { _dataTools.SetNullStringsEmpty(model); var report = await _reportBuilder.GetReport(model); //report.CalculationMode = StiCalculationMode.Interpretation; report.Save("C:\\Csharp-Projects\\stimulTest\\stimulTest\\rep.mrt"); report.Render(false); report.ExportDocument(StiExportFormat.Pdf, "C:\\Csharp-Projects\\stimulTest\\stimulTest\\rep.pdf"); var result = report.SaveDocumentJsonToString(); //var viewmodel = await _repository.GetReport(model); //var result = new ReportStyle<List<RepairReportViewModel>> //{ // ReportTemplate = report.SaveToString(), // Data = new Pagination<List<RepairReportViewModel>>() // { // Count = 30, // Page = viewmodel.Count / 30, // Total = viewmodel.Count, // DataSets = new List<DataSet<List<RepairReportViewModel>>> // { // new DataSet<List<RepairReportViewModel>>() // { // DataSetName = "dataset", // Resource = viewmodel // } // } // } //}; return(result); }