>Dear Experts
>
>I have three dbf’s as
>
>Procuts
>Addition
>Discount
>
>I want to print invoice in
>
>In 1st band: Products
>In 2nd band: Addition
>In 3rd band: Discount
>
>The print preview should look like this
>
>Product-------Qty------Rate--------Amount
>Apple-----------5---------10------------50
>Banana--------30-------10-----------300
>Sub Total------------------------------350
>
>Addition
>Supply expenses---------------------20
>Sub Total------------------------------370
>
>Discount-------------------------------70
>Total------------------------------------300
>
>Should I use more than one Detail Band or is there any other method exists.
>
>Please help
Yes, multiple detail bands would help in this situation. You need to have a parent table that each of the 3 child tables are related to and make the parent table the current table when running the report. Great a data group on the parent, such as "Invoice Number" or whatever field identifies these.
If the amount fields are all named the same in each table, you can probably just use the calculate SUM option resetting it at the data group. However, if not, you'll have to get a little trickier to total up the amounts. Start by reading my blog (
http://cathypountney.blogspot.com/2008/04/how-do-i-total-fields-for-one-detail.html) to see how to create a variable that identifies which band is running. Then create a report variable that does something like this .. ICASE(rnDetailBand = 1, Amount, rnDetailBand = 2, Addition, rnDetailBand = 3, Discount) and sums it.