Wednesday, March 7, 2012

Carry Forward Balance

Hello All,
I'm creating a "stock ledger" using Crystal Reports 8.0. This report is printed monthly and requires that the previous month's closing balance become current month's opening balance. How do I do this?
Regards,
Rajmathihi.........

i dont know wts ur tables structure is.................but u can apply condition in ur query as

select sum(AmountField) from TableName where Month(TableName.DateField)=Month(TableName.DateField)-1

Best of Luck|||Hello "Silly Star"

Thanks for the reply, but the opening balance stock quantity and stock value are to be calculated as follows:

Every time new stock is received, the new quantity and its value gets added to the existing stock and a new rate-per-unit is calculated. suppose say I have received two consignments of a particular item on different dates, one of 100 units at 1 Re. each and the other also of 100 units, but at a cost of Rs. 1.10 each then the total stock with me is worth 210.

The same concept is applicable when stock is issued. Now when I have to issue an item I have to issue at Rs. 1.05 each.

Therefore directly considering the total of the quantity recieved and quantity issued can give me info on the quantity used, but there is huge variation in the cost (value) factor. There is fluctuation in the value and the RPU gets changed everytime new stock is received.

The report that I have designed could be used to get stock across months (say Apr - Oct). The closing balance of Apr should be taken as opening balance for May and so on.

It seems in D2K there is separate option using which this can be performed. I just wanted to know if there is a way out in Crystal Reports too

Regards,
Rajmathi|||RajMathi,
I am not sure about this.
I think you can use formula field having the code

currencyvar opbal;
whilprintingrecords;
if month{datefiled}="April" then
opbal:=opbal+{ClosingBalField};

Use other formula to check whether the month is may, if so
add opbal value to openingbalance value of May|||Hello madhi,

Well, I missed out one thing. There are several items in stock and the grouping is on items, so opening balance is separate for each item.

Regards|||RajMathi,
Ok then use other formula named @.Reset having this code

currencyvar opbal;
EhilePrintingRecords;
opbal:=0;

and place this in Group header and other formula in Dectails Section

No comments:

Post a Comment