1

Group 1 = Date of order

Group 2 = product and current on hand

Day1

20140423   (Day 1)   
product A                   200    
Order 1                     -20
Order 2                     -20
Balance                     160

Product B                   100
Order 1                     - 5

Day 2

20140424  (Day 2)
Product C                    16
Order 1                     - 5

Day 3

20140425  (Day 3)
Product A                   160  

How do I pass the ending balance from Product A day 1 to the beginning balance for Product A day 3

Pls explain in detail because I am a novice report writer.

Siva
  • 9,043
  • 12
  • 40
  • 63
kengol
  • 11
  • 1

1 Answers1

0

Try below approach: Create a formula @StoreValue and write below code.

    Local NumberVar Storevalue;
    Local NumberVar display;

    if ({Date},{@Group1})=20140423 and ({Product},{@Group2})=product A'
    Then Storevalue:=//Balance value of A;

    if ({Date},{@Group1})=20140425 and ({Product},{@Group2})=product A'
        Then display:=Storevalue;
    else 
    display:=//Your calculation here;
    display;

Now place this value in Balance row.

Siva
  • 9,043
  • 12
  • 40
  • 63