Cloud
Облачный сервис для быстрого и эффективного анализа и визуализации данных для вашего бизнеса без необходимости создания своих приложений и программирования.
StiWebViewerOptions, and adds both to the model:@Controller
public class StimulsoftController {
@Autowired
ServletContext context;
@GetMapping("/viewer")
public String viewerAction(Model model) throws Exception {
String reportPath = context.getRealPath("/reports/Dashboards.mrt");
StiReport report = StiSerializeManager.deserializeReport(new File(reportPath));
report.render();
StiWebViewerOptions options = new StiWebViewerOptions();
options.getToolbar().setViewMode(StiWebViewMode.Continuous);
model.addAttribute("report", report);
model.addAttribute("options", options);
return "viewer";
}
}@GetMapping("/designer")
public String designerAction(Model model) throws Exception {
String reportPath = context.getRealPath("/reports/Dashboards.mrt");
StiReport report = StiSerializeManager.deserializeReport(new File(reportPath));
StiWebDesignerOptions options = new StiWebDesignerOptions();
model.addAttribute("report", report);
model.addAttribute("options", options);
return "designer";
}/viewer, /designer) prepares a report on the server, attaches it and its options to the model, and returns the name of a view template that emits the Stimulsoft component. This gives you a complete edit-and-preview workflow — view a report, jump into the designer, and back — entirely within a Spring Boot application.