When exporting on the server, data can be registered in the onBeforeRender event — supplied as client JavaScript run by the Node.js engine.

Register data, then export.
$report = new StiReport();
$report->engine = StiEngineType::ServerNodeJS;

$report->onBeforeRender = '
    let dataSet = new Stimulsoft.System.Data.DataSet("Demo");
    dataSet.readXmlSchemaFile("data/Demo.xsd");
    dataSet.readXmlFile("data/Demo.xml");
    args.report.dictionary.databases.clear();
    args.report.regData("Demo", "Demo", dataSet);
';

$report->process();
$report->loadFile('reports/ProductStats.mrt', true);
$result = $report->exportDocument(StiExportFormat::Html);

How it works. The data-registration script runs inside the Node.js engine, so a headless export can bind data exactly as the browser would.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.