kuldeepsharma
11th May 2007, 12:31
Dear All,

I and customising a report on tdinv700 table.

Here I want to print opening balance of Particular item in a particulars warehouse.

I have to select the last record before the starting date, which will give me the opening balance.

can some one give me the procedure how to do it ?.

Thanks in advance
Kuldeep Sharma

mark_h
11th May 2007, 14:56
Basically if you can select the records then all you need to do is add:

order by tdinv700.trdt desc
as set with 1 rows

This puts the dates descending and selects only the first record.

Hitesh Shah
11th May 2007, 15:27
"Order by index1 desc " in the code suggested by mark , will consider time also. This way u'll get opening balance . U'll need 2nd select on tdinv700 to get from to transactions .

kuldeepsharma
12th May 2007, 08:04
thanks u sir,
Kuldeep sharma