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
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