Chapter 1. Creating Static and Dynamic Titles and Headers

In this chapter, you will learn:

  • Downloading, installing, and running JasperReports and iReport
  • Creating your first "Hello World" report
  • Creating and sizing the title for your report
  • Using dynamic titles, which can change during report processing
  • Inserting company logo in the title of your report
  • Adding a simple header to your report
  • Setting margins of your report and aligning the report header relative to report margins

Introduction

This chapter is about the titles and headers of your reports.

Imagine you are looking for a particular recipe in a cookbook. Perhaps the quickest way of doing this is to go through the table of contents, which is just a list of the titles of all the recipes contained in this cookbook. So it is important that each title says what the recipe teaches.

Similarly, the title of your report will help identify the report among other reports. The title perhaps decides the objective of designing a report.

A title normally appears on just the first page of your report. The header appears on every page. While a title helps to identify the report among other reports, a header distinguishes the report among other copies of the same report. You can understand this with an example.

Consider you are designing a report showing the data for all invoices issued for a particular customer during a specific month. "Monthly Customer Invoices" can be an appropriate title for this report. Once you have designed the monthly customer invoices report, you will periodically generate copies of this report for a specific customer and for a specific month (that is, each copy of the report will be specific for these two parameters). Therefore, it is a good idea to include these two parameters in the header of your report.

This means that a report header represents the data on which a report is generated.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.103.96