query to get opening, period activity and closing for whole year month wise
I have to make a report/query that will display inventory detail of a year month wise in following format:
Jan Feb Mar Apr ---------------------------------- Dec Total
Opening
Purchases
Consumption
Closing
-----------------------------------------------------------------------
i have writen query to fetch the opening of January and then purchases and consumtion monthwise.For January Sum of OPening,purchase and consumtion return the claosing value its simple.
And closing of previous month should become the opeing of next month. I am confused here how to do that. I have build a matrix report. But I am confused in finding the way to make previous month closing as next month opening either in query efficiently ot in report. Actual query is time taking so please any idea to do it in efficient manner please