getting opening balance on a given ledger account

How do i do it? I tried using the balance method on LedgerBalanceSum_CurrentMST but it doesnt seem to work correctly (my opening balance on Account Statement Report is different from what i get from a simple job using the above object. I made sure to use same arguments to create my LedgerBalanceSum object as the report uses) Please help.

Have you tried in the job: LedgerBalanceSum_CurrentMST ledgerBalance; ; ledgerBalance= new LedgerBalanceSum_CurrentMST(ptb.parmPeriodStart(), periodEnd, dimensionCriteriaEmpty, NoYes::Yes, opening, NoYes::Yes, OperationsTax::Current, DebCredProposal::None, NoYes::Yes, NoYes::Yes); OpeningBalance = ledgerbalance.balance(AccountNum);

I tried this: ledgerBalance=new LedgerBalanceSum_CurrentMST( 20\5\2005, 3\6\2005, dc, NoYes::Yes, NoYes::Yes, NoYes::Yes, OperationsTax::Current, DebCredProposal::None, NoYes::Yes, NoYes::Yes); what’s ptb in your version?

ptb is a object of a class that I used to retrieve the start date of the period. Try at the init method of the report LedgerReport_AccountStatement

Hi, Which versions are you both working with? In my Axapta 3.0 SP3 this goes fine. But in the SP4, it is simply not giving the right results anymore. Thanks, Ciprian

i’m using 3.0

That report is actually where i got the inspiration to try LedgerBalanceSum class. Your pdb object just returns dates correct?

My ptb object jus returns the start date of the current fiscal year. How bout looking at the init method of the LedgerTrialBalance report. I think there should be comments in it.

You just helped me more than you know! The report you pointed me to (LedgerTrialBalance) is the exact one i was trying to write[:D] Thanks a bunch.

No problem. Glad you got through.

quote:

Hi, Which versions are you both working with? In my Axapta 3.0 SP3 this goes fine. But in the SP4, it is simply not giving the right results anymore. Thanks, Ciprian
Originally posted by Mugur - 2005 Jun 09 : 02:01:45

My bad. I was testing with a wrong dataset. The SP4 works ok, just as the other SP of 3.0. [:I]