Keyword Index

© 2004-2012 Metamatica Software

Step 5: page header, title and summary band

Top  Previous  Next


Lets assume you we have created a report which lists addresses from a table, the report layout is already quite useable and the preview might look like this:




What is missing is some "decoration", like a title on the first page and a page header with column captions for each data field. Also a summary at the end of the report, presenting the total number of printed records for example, would look good.


Page header:


Each page of the report printout should have a page header with column headings for each column of data in the address list, i.e. there should be a big "Name" label above the column of company names etc.

First we insert a new band for the page header by using the _bm12 button and selection "Page header" as the band type. Now we add labels for each column, with captions corresponding to the field names.






To set a bigger font size, bold font style or another font you must select all labels and set the desired font attributes with the toolbar.


Title band:


A title for the first page of the report can be added by inserting a new report band and settings its band type to "Title band". Then add a label to the title band and set its font size to something big, like 24 points for example. Additionally you could add the current date and time to the report header, so you can see when the report was printed for each printout. To do this use the button _bm20 to add a system field to the top right corner of the title band, and set its type to "Date/Time". Now the title band looks the following way:




When previewing the report you will notice the following problem: The page header appears on the first page before the title band (just like the two bands are positioned in the report editor). You can correct this by printing the page header only on the second page and following, but not on the first page, and by adding the now missing column captions to the bottom of the title band. First select the page header band and open its property dialog. Select the option titled "not on first page" to prevent the band from being printed on the first report page. Then resize the title band to make room below the title label for the content of the page header. You don't need to recreate all report elements for the title band that are on the page header, but you can select them on the page header band, copy them to the clipboard, select the title band and paste the clipboard elements there. Now that all elements are copied from the page header to the title band, they are still selected and you can move them to the bottom all together.


Summary band:


To add a summary to the end of the report, insert a new band and set its type to "Summary". You can now add report elements to this new band, for example you can use a "Detail count" system field  and set the field's label to "Number of records printed:". The number of records will now be printed at the end of the report, e.g. "Number of records printed: 78" if you have 78 data records in your report table.



The complete report layout could look like this:




The following printout would be generated: