Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Skipping details based on field value

Status
Not open for further replies.

norwood

Technical User
Feb 24, 2003
14
US
This may be an easy one but I'm a newbie and can't figure it out...

I'm creating a report based on a table containing invoices. My table looks like this:

Invoice Number..........Item.........Price
123.....................ProductA...50
123.....................ProductB...10
123.....................ProductC...30
100.....................ProductA...50
90......................ProductD...0
90......................ProductA...50
90......................ProductB...20

In my report, I'm summarizing the invoices and using the total for each type of product, for example:

Invoice No....Product A.............ProductB........ProductC.........ProductD..........Total
123..............50..........................10.................30..................0.....................90
100..............50...........................0..................0...................0.....................50
90................50..........................20..................0....................0...................70

Now, I need that when the first line item of my invoice is ProductD and when it's value is zero, to add all item prices as if they were Product D and assign zero to the other products (invoice number 90, from my example above). It would look like the following in my report:

Invoice No....Product A...............ProductB........ProductC.........ProductD..........Total
123..............50..........................10.................30..................0.....................90
100..............50...........................0..................0...................0.....................50
90..................0...........................0..................0...................70....................70

How can I do that?

Let me know if you need more details or clarification.
Thanks!!!!!

daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top