Loading Scripts in Part to Minify Project
Our sample projects and report templates can help you learn the basics of working with our products.This example is outdated, you can check out the many other new examples in this category.This example shows how to minify project. First, you need to add the Stimulsoft libraries:
Next, you should define JavaScript modules required for the component to work. Additionally, you can use a packaged version of scripts to speed up loading and save traffic. All code should be added in the
Now you can use the code to deploy the report generator and the viewer or designer component. The code will be exactly the same as when using a full set of scripts.
<?php
require_once 'vendor/autoload.php';
?>
Next, you should define JavaScript modules required for the component to work. Additionally, you can use a packaged version of scripts to speed up loading and save traffic. All code should be added in the
<head> block of the HTML page:
<?php
$js = new \Stimulsoft\StiJavaScript(\Stimulsoft\StiComponentType::Designer);
$js->options->reports = false;
$js->options->blocklyEditor = false;
$js->options->reportsChart = true;
$js->options->reportsExport = true;
$js->options->reportsImportXlsx = false;
$js->options->reportsMaps = false;
$js->usePacked = true;
$js->renderHtml();
?>
Now you can use the code to deploy the report generator and the viewer or designer component. The code will be exactly the same as when using a full set of scripts.