Kedar Pawgi

Kedar Pawgi

  • 1.6k
  • 136
  • 63.3k

Adding value in 1st record only

Apr 21 2014 10:46 AM
Hi
 i am preparing a stock statement report, where i show opening balance of the material (on 01/04/2014  FY year) .
when the report starts depending upon the transaction of the 1st record  the opening balance should be added. Actually its 20th today so already the 1st record is know to me its a purchase so what i want to do is to add the opening balance to this purchase. From the next record its should start working accordingly. I am using Formula field to calculate daily stock like credit debit entries are made.
 
if u see the images the right most column is the daily stock of the material. I want to add the opening balance(10) to only 1st record. Ho i should achieve using Crystal Report. i am suing formula to calculate the right most column value which is as below
 
if ({stockledger.transactionType}='DM')
then

numberVar tSum := tSum - {stockledger.qty}

else

numberVar tSum := tSum + {stockledger.qty}
 
but how i should add the opening balance to only 1st record and it should get added to right most column of daily stock...
its a live project and i  m horrible stuck up plz guide me thanks in advance...

Answers (1)