Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

A simple task is getting difficult.

edited February 2013 in General
Hello.

I have a single table with 20 posts.
From this I try to make an invoice where I first put DBText components
for name and adress on the top of the header.
Then I need to repeat the same post with DBText for the same name and
adress on the Footer where the invoice amount also is.
Logical behavior should be that I get the same customer name on the
header and the footer, but I get the first one in the table on the
header
and the last one in the table on the footer.
Now I will try to only use the header for the whole invoice and
hopefully it does not only print the first post of the table.
I do not use the detail band, as this invoice is the same for all the
customers, so I only need some text on it in addition to the different
names that shall recieve it.

I'm running out of time as I have to deliver the invoices tomorrow.
Any suggestions appreciated.

:)
Kai Inge

Comments

  • edited February 2013
    I assume that by "posts" you mean records? If so, then surely you just
    sort the invoice table by CustomerID (or Customer Name) and then you add
    a Group to the report that uses the same field. All your DBText controls
    then go in the Group Header and Footer bands.

  • edited February 2013
    Paul Toms wrote:


    Hello again.

    Yes, sorry, I meant records.
    Now I have all the fields on the header band and they all fit where
    they should be in the page.
    I set the HouseNumber field as IndexFieldNames in the qry.
    Still it only prints the first record, even if I set MyQuery.Next and
    try again. The next record is showing in a grid, but the first record
    is printed and then it stops executing.

    My environment is:
    Delphi 2009E
    UniDac components, in this case:
    TInterbaseUniProvider->TUniConnection->TUniQuery.
    Firebird 2.5.0.26074
    Report Builder 12.05 for Delphi 2009, using TppDBPipeline and TppReport.

    What can I do?

    :)
    Kai Inge
  • edited February 2013
    What happens if you move all the fields to the Detail band?

  • edited February 2013
    Paul Toms wrote:



    I had the same idea and have just done the work to copy all the fields
    to the detailband and set the header band not visible.
    Now It works like a charm.
    I would believe that the header and footer should 'automatically' be in
    the same group and that it should traverse the whole table without the
    detailband.
    But for now I'm happy, as I got the job done before deadline.

    I have only experience in early days with Quick Report, and it had the
    same consept with header, detail and footer, but there the header and
    footer showed the same record
    in the master table, while the detail band traversed the detail table.
    For now I don't have a master/detail relationship to test on, but will
    later.

    Thanks for your help, Paul.

    :)
    Kai Inge
  • edited February 2013
    Hi Kai,

    I highly suggest you spend some time going over the Developer's Guide
    included with ReportBuilder and working through the tutorials included.
    This will give you an idea about how ReportBuilder functions and what
    is necessary to produce the reports you need. The developer's guide is
    located in the following location along with hundreds of useful demos.

    http://www.digital-metaphors.com/rbWiki/General/Installation/Tech_Tip:_Demo_Location


    It is necessary to use the detail band to traverse connected data. If
    you would like data traversal inside a different band, you can also use
    Subreports (which also contain a detail band).

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.