powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Delphi [игнор отключен] [закрыт для гостей] / FastReport PageFooter Stretch
2 сообщений из 2, страница 1 из 1
FastReport PageFooter Stretch
    #39698178
Иванчин Вячеслав
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Сильно ногами не пинать.

Есть Отчет, который экпортирую в PDF файл.

Во время экспорта добавляю ещё свои компоненты в pageFooter.

пример :
Код: pascal
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
for rv := 0 to  Report.PreviewPages.Count - 1 do
      begin
        frxPage:= Report.PreviewPages.Page[rv];
        if jcntQR = cntQR then
          Break;
        for I := 0 to frxPage.AllObjects.Count - 1 do
        begin
          if TObject(frxPage.AllObjects.Items[i]).ClassNameIs('TfrxPageFooter') then
          begin
            pagefooter:= TObject(frxPage.AllObjects.Items[i]) as TfrxPageFooter;
            sizeBarcode.Empty;
            with sizeBarcode do
            begin
              Left:= 0;
              Top:= 0;
              Width:= 0;
              Height:= 0;
            end;

            repeat
              pictLogo:= TfrxZintBarcode.Create(pagefooter);
              pictLogo.BarcodeType:= tBARCODE_QRCODE;
              pictLogo.DataFormat:= dfUTF8;
              pictLogo.Data:=
                '<?xml version="1.0" encoding="UTF-8"?><root><elementdata>' +
                Copy(outsign, (jcntQR * 896) + 1, 896) +
                '</elementdata><elementnumber>' + IntToStr(jcntQR) +
                '</elementnumber><elementsAmount>' + IntToStr(cntQR) +
                '</elementsAmount></root>';
              inc(jcntQR);
              pictLogo.Name:= 'QR_CODE' + IntToStr(jcntQR);
              pictLogo.SetBounds(
                sizeBarcode.Left,
                sizeBarcode.Top,
                sizeBarcode.Width,
                sizeBarcode.Height
              );
              pictLogo.Zoom:= 0.5;
              sizeBarcode.Left:= sizeBarcode.Left + Trunc((pictLogo.Width)) + 10;
              sizeBarcode.Width:= Trunc(pictLogo.Width);
              pictLogo.Height:= pictLogo.Width;
              if sizeBarcode.Height < pictLogo.Width then
                sizeBarcode.Height:= Trunc(pictLogo.Width);
            until ((jcntQR mod (trunc(pagefooter.Width) div sizeBarcode.Width)) = 0) or (jcntQR = cntQR);

            pagefooter.Height:= pagefooter.Height + sizeBarcode.Height + 5;

            for k := 0 to pagefooter.AllObjects.Count - 1 do
              if not TObject(pagefooter.AllObjects.Items[k]).ClassNameIs('TfrxZintBarcode') then
                TfrxReportComponent(pagefooter.AllObjects.Items[k]).Top:= sizeBarcode.Height;
            Break;
          end;
        end;

        if Report.Preview <> nil then
        begin
          Report.Preview.Lock;
          Report.PreviewPages.ModifyPage(rv, TfrxReportPage(frxPage));
          Report.Preview.Repaint;
          Report.Preview.Unlock;
        end;
      end;



соотвественно PageFooter растягивается но данные которые я ввел не видны полностью, как пере строить отчет заново что бы корректно был виден PageFooter?!
...
Рейтинг: 0 / 0
FastReport PageFooter Stretch
    #39698494
Фотография Кроик Семён
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Как вариант, перед экспортом еще раз втихую добавить в отчет (а не в PreviewPages) нужные элементы и еще раз, соответственно, вызвать PrepareReport(true)
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / Delphi [игнор отключен] [закрыт для гостей] / FastReport PageFooter Stretch
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]