Guest mode. You can read posts without signing up. Comments, ratings, job contacts and your own posts open after you sign up and accept the rules. What is Kommit →

📚 Guide1С: отчеты на СКД, БСП и печатные формыТиповые подсистемы · часть 3 из 3
Guide contents
Типовые подсистемы
  1. 1С: отчеты на СКД, часть 2: БСП — подсистемы, которые не нужно писать самому
  2. 1С: отчеты на СКД, часть 3: печатные формы — макеты, БСП и доработки через расширение
Редакция КоммитРедакция портала
commit 76f1d6c · 19 days ago

1C: reports on DCD, part 3: printed forms — layouts, BSP, and refinements through extension

🌐 Machine-translated from Russian. Show original

In this part:

Variants#

MethodWhen
External print form via "Additional Reports and Processing"quickly without changing the configuration of the
Print form in extensioncontinuous improvement, required in the print menu of the
Changing the defaultalmost never — breaks updates

Table document layout#

  • The layout is divided into named areas: Header, Row, Basement.
  • The cells contain parameters ([Номер], [Контрагент]), not text pasted into the code.
  • A separate layout for each language if the document is printed in Russian and Kazakh.

Formation code#

Функция СформироватьПечатнуюФорму(МассивОбъектов)
    ТабДок = Новый ТабличныйДокумент;
    Макет = ПолучитьМакет("Акт");
    ОбластьШапка = Макет.ПолучитьОбласть("Шапка");
    ОбластьСтрока = Макет.ПолучитьОбласть("Строка");

    Для Каждого Ссылка Из МассивОбъектов Цикл
        Если ТабДок.ВысотаТаблицы > 0 Тогда
            ТабДок.ВывестиГоризонтальныйРазделительСтраниц();
        КонецЕсли;
        ОбластьШапка.Параметры.Заполнить(Ссылка);
        ТабДок.Вывести(ОбластьШапка);
        Для Каждого Строка Из Ссылка.Товары Цикл
            ОбластьСтрока.Параметры.Заполнить(Строка);
            ТабДок.Вывести(ОбластьСтрока);
        КонецЦикла;
    КонецЦикла;
    Возврат ТабДок;
КонецФункции

Get print data with a single query across all documents, not by accessing details in the loop through a point — otherwise, printing a batch of documents will be slow (why).

Integration into BSP#

Connecting the print form to the print menu is done through the software interface of the "Print" subsystem (procedures for adding print commands and generating printing forms in the manager module or in processing). See the documentation for your BSP version and in examples of standard print forms of your configuration.

Checklist#

  • The form is printed as a stack of documents with page separators
  • Data is obtained with a single request
  • Numbers and dates are formatted, sums in words using standard functions
  • The form is placed on a sheet of the required format, verified by printing, and in PDF
  • Modification — in external processing or extension, not in the standard

🎉 Series completed. Return to contents.

Comments 00 участников · 0 гостей🔒 Rate and discuss after signing up

Comments · 0

No comments yet.Sign in to comment, rate and see all comments.