When you select Print in the invoice list, you see composed template.
In most cases, it contains a header, followed by invoice rows, followed by summaries and additional information. Information about selected invoices (or one invoice) comes to report generation system from a database. This system processes this data and displays in the form, which is ready to be printed or saved into file. To correctly display this data, a specific template structure is required. This structure is created on the designer surface. The whole structure consist of a number of bands, which are printed in a certain order necessary amount of times.
Here is how empty report looks like:
It contains the following bands:
- The Detail band, which is printed for every record in a data source (i.e., for each invoice you selected in invoice list). Every template should have the Detail band, and you cannot delete it.
- The Top Margin and Bottom Margin bands. These bands are repeated once on every document page. You also cannot delete them, but can make them invisible by decreasing height to zero.
You can also add the following bands:
Report header and report footer |
The Report Header is the report's first band (margins are "out-of-page" zones). The Report Footer is placed before the Page Footer and Bottom Margin on the report's last page. Usually these bands are not used in invoice/quote templates, as it makes no sense to print some header or footer for a batch of invoices. |
Group header and group footer |
These bands are above and below each group. The Group and Sort Panel creates these bands automatically. For example, each invoice may contain multiple jobs, and each job, in its turn, may contain multiple tasks. In this case, job can be presented as a group, and you may display some totals for each job. While designing the template or report, you're free to create groups (for example, by currency in custom reports), and use group headers and footers per current task. |
Detail |
Displayed once per data row. If you print multiple invoices, it will be printed once per each invoice. Thus, this is ideal band type to display invoice header. |
Page header and page footer |
These bands are at the top and bottom of every page in a report. They display information that should be printed on every page (for example, logo or number of pages). |
Sub-band |
Very interesting type of band. It may contain some logically separated kind of information. You can apply special rules to display or hide this band. for example, invoice may contain tax or may not contain tax. You can put tax amounts into sub-band and print it depending of the tax selection. Another example: if tax in invoice is not selected, than you may have a special sub-band where a text explaining absence of taxes will be displayed. |
Detail report |
Used when you need to display internal table (multiple rows). For example, after invoice header, which is printed once, a number of rows are printed. To correctly display them, you have to add Detail report inside Detail band. |
Here is graphical representation of this structure: