Search code examples
delphifastreport

Print a form using FastReport VCL 5


I am testing out FastReport VCL 5 as a replacement for our application's extremely old reporting tool. One of the things we do a lot of is printing of forms to laser printers and I am trying to figure out how to print the form elements. For example, we have an invoice that has some borders around the edge of the page, company name at the top, watermark logo image in the middle, dividing lines, etc. Inside these form elements are the standard invoice headings (invoice #, date, account name, etc) and detail items (specific charges, comments, etc). I cannot figure out how to get the form elements to print behind the master and detail bands? If I use the page heading band, it has to print before (not behind) the master data band.

Here is a sample of what I'm trying to do: Sample Invoice

The shaded blue area is the invoice header (the master data band). The shaded green area is the invoice details (the detail band). The shaded yellow area is the totals band. The rest of the report (the frames, lines, company header, etc.) are all parts of the form.

Now, the trick to this is that if this invoice spills on to multiple pages, the invoice header has to reprint and the details have to stay inside the box that they are in (between the 2nd and the bottom horizontal lines). I tried the overlay but there does not seem to be a way to restrict the detail band between two y coords.


Solution

  • Using @bummi's suggestions, I moved the header information in to a Page Header band (instead of a Master Data band) and the invoice items then went in to the Master Data band. I then added a Page Footer band to keep the invoice detail from overwriting the bottom of the form. Finally, all of the form stuff I put in to the Overlay band. To create the watermark, I created a very light version of the image and then just put that as a picture in to the Overlay band.