> For the complete documentation index, see [llms.txt](https://projects.itproduct.ru/azimut/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://projects.itproduct.ru/azimut/dokumentaciya/avtozadachi-po-raspisaniyu-1/obrabotka-otchetov.md).

# Обработка отчетов

Автозадача "Обработка отчетов" это часть подсистемы серверной печати документов. Обработчик периодически просматривает очередь на формирование отчетов, при появлении там записей, берет очередное свое "задание", запускает отчет и прикрепляет к указанной сущности.

Очередь на создание отчетов это таблица SY\_ReportQueue. С помощь процедуры SY\_AddReport можно добавить новое задание обработчику на создание отчета.

Пример

```sql
exec SY_AddReport
		'BDFB4752-D8A2-452C-BEB2-F258DE871CC2', --uid накладной
		'26283CFA-7E04-4EC0-A2A9-1D37E7366503', --тип вложений Документы
		'ef9549e8-e7ab-4113-9de9-4add8d5f4001', --отчет Накладная ТОРГ-12
		'ТОРГ-12.pdf',
		'<Parameters><Parameter><Name>documentID</Name><DbType>Guid</DbType><Value>BDFB4752-D8A2-452C-BEB2-F258DE871CC2</Value></Parameter></Parameters>', --uid накладной
		'D3B58E69-07A7-4DD9-995F-F16B0F3CB263' --Администратор
```

Этот пример добавляет в очередь создание ТОРГ-12 по накладной с указанным ID.

В зависимости от периодичности этой автозадачи, через некоторое время во вложениях накладной появится pdf отчет ТОРГ-12.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://projects.itproduct.ru/azimut/dokumentaciya/avtozadachi-po-raspisaniyu-1/obrabotka-otchetov.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
