Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sales Tax Invoice
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01313261
Message ID:
01313464
Views:
8
>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.
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Reply
Map
View

Click here to load this message in the networking platform