A report can be rendered and sent to print directly from PHP code. This example loads a report, renders it, and prints it.

Printing from code. Load and render the report, apply the printer settings, and start the print workflow from application code.
$report = new StiReport();
$report->javascript->relativePath = '../';
$report->process();
$report->loadFile('../reports/SimpleList.mrt');
$report->render();
$report->print();
$report->printHtml();


render() builds the document and print() opens the browser print dialog for it; printHtml() outputs the page with the required scripts so printing runs automatically.

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