SSRS report - opening and closing balance

hi all,

i am preparing the report for daily stock register for single item in ssrs

can any one tell me from where can i find the opening and closing balance i mean from which table in ax?

i have used the following code to fetch the opening balance.

OPeningBal=TmpDSADetails_IN::insertIntoTmpDSADetails(taxTrans.CompanyRegistrationNumber,ToDate,FromDate).OpeningBalance;

but i m getting the wrong answer for opening balance can any one tell me the right way to fetch the opening balance and closing balance along with the manufactured and issued quantity…

currently i m using 2 ax tables to develop this report ‘Taxtrans_in’ and ‘tmpdsadetail’

pls help its urgent.