>We need to add some detail lines to some invoice report summaries. These list the tax amount, discounts, etc. and then the total invoice amount. In the past we just created a memo field and a stretch text box. Now we are trying to use a 2nd detail band but what we came up with seems to be a real kludge. It appears that the only way you can get a 2nd detail band is if the table with the summary data is related to the 1st table. We did it but we have to do a print when on the heading, and all kinds of stuff to get it to work. Is there an easier way?
>TIA
Multiple detail bands work off the premise of a parent table driving the report and each detail band is a child table related to the parent. So in your case, you should have an INVOICE table that has the main invoice number, customer number, etc. That should be the table driving the report. You then have another table with INVOICELINES that has all the detail lines of the invoice. It should be related to the parent table. Then create another table/cursor called INVOICESUM where you create the "lines" you want on the summary band and relate this to the parent table as well. The report writer will process a record in the invoice table, jump over the to the INVOICELINES table and process each record for that invoice, then it will jump over to the INVOICESUM cursor and process each record in this cursor that relates to the invoice. It then jumps back to the INVOICE table and starts the process over with the next invoice record.
Read thru this article for more information on Multiple Detail bands:
http://msdn.microsoft.com/en-us/library/ms965279.aspx