logo
small logo
  • Produkty
  • Zamów
  • Wsparcie techniczne
  • About
  • Customer panel Wsparcie techniczne
    • en
    • de
    • JP
    • ZH
  • Glówna strona
  • /
  • Articles
  • /
  • How to make a repeating band
  • Format MS Word vs. Open Document Text. Który jest lepszy?

    19 października 2020

    Mówiąc o edytorach tekstu, od razu przedstawiamy koryfeusza w postaci programu Microsoft Word, który od

    read more
  • Chcesz wygenerować tabele dla użytkownika - Excel lub OpenOffice Calc?

    8 października 2020

    Tabele. Od wieków służą do prezentacji podobnych danych w celu prowadzenia zapisów, liczenia kwot i

    read more
  • Jak dokonać dziedziczenia raportów w FastReport.NET

    29 stycznia 2021

    Kiedy masz za zadanie stworzyć dużą liczbę raportów w ramach jednego stylu korporacyjnego, stajesz przed

    read more
  • Jak chronić dokumenty PDF?

    30 listopada 2020

    Z okazji Dnia Ochrony Danych Osobowych, zdecydowaliśmy się przygotować artykuł dotyczący ochrony dokumentów PDF. Format

    read more
  • Jak programowo skonfigurować domyślne ustawienia klienta pocztowego dla wysyłania maili z FastReport.NET

    12 lutego 2021

    Jak wiele innych generatorów raportów, FastReport .NET pozwala na wysłanie raportu pocztą elektroniczną w dowolnym

    read more

How to make a repeating band

13 października 2019

Sometimes it is required to display the same information several times in a report. This may be required in reports that will be printed, for example, invoices, business cards, announcements, invitations, and others.

This was not a trivial task before. You had to use a report script to “multiply” the band. For example, like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public class ReportScript
 {
 int i = 0;
 int count = 3;
 private void PageHeader1_AfterPrint(object sender, EventArgs e)
 {
 for (int i = 0; i < count - 1 ; i++)
 Engine.ShowBand(Data1);
 }
 private void Data1_BeforePrint(object sender, EventArgs e)
 {
 if (i == count)
 Data1.Visible = false;
 }
 }

 Here we had to use two event handlers. First, after showing the header band, that is, before showing the Data band, we needed to generate the required number of data bands. Then, before displaying the Data band, check whether the required number of bands has been reached.

This option is quite workable, but still requires a report developer to have some programming skills and good knowledge of the generator engine to understand how bands will be displayed on the page. All this imposes restrictions on the developer.

From now on, from version 19.3.4, there is a “regular” solution to this issue - the RepeatBandNTimes property for the band. You simply set the desired number of output band instances.

As a result, we get the same result as with the script:

It's nice that the report generator is becoming more and more convenient and does not burden the report designer with unnecessary work.

about product zamów
avatar
Dmitriy Fedyashov
Technical Writer
Fast Reports Team: Dmitriy Fedyashov - Technical Writer at Fast Reports
.NET FastReport

Add comment
logo
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314
  • Zamów
  • Pobierz
  • Dokumentacja
  • Opinie użytkowników
  • Jak odinstalować nasze produkty
  • FAQ
  • Tutorial Video
  • Forum
  • Support SLA
  • Articles
  • Our News
  • Prasa o nas
  • Partnerzy
  • Extended licensing
  • Kontakty

© 1998-2023 by Fast Reports Inc.

  • Poufność

Trustpilot