web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Select Date Wise Net Balance

(0) ShareShare
ReportReport
Posted on by

Dear Expert

Below query date criteria is not working i am getting todate amount from database

please advice on query...Thanks

Afridi

display Amount VendorTotalCreditOnGrid(VendTrans _VendTrans)
{


real VendTotalCredit;
VendTrans vendTransLocal;

select sum(AmountCur) from vendTransLocal
where vendTransLocal.AccountNum==_VendTrans.AccountNum && vendTransLocal.AmountCur<0
&& vendTrans.TransDate <= TxtDate.dateValue();

VendTotalCredit = vendTransLocal.AmountCur;

return VendTotalCredit;


}

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Dick Wenning Profile Picture
    8,705 Moderator on at

    I assume that txtDate is a control on a form?

    is this one of EDT type TransDate?

    also

    select sum(AmountCur) from vendTransLocal

    where vendTransLocal.AccountNum==_VendTrans.AccountNum && vendTransLocal.AmountCur<0

    && vendTransLocal.TransDate <= TxtDate.dateValue();

    VendTotalCredit = vendTransLocal.AmountCur;

    return VendTotalCredit;

  • Community Member Profile Picture
    on at

    Thanks Dick

    Yes it is control on form and EDT is TransDate  and I droped Display Method on grid

    to calculate amount

  • Community Member Profile Picture
    on at

    I Just Put the Local in query thanks for identifying

  • Community Member Profile Picture
    on at

    Thanks Dick I got my result

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
TAHER_El_Mehdi Profile Picture

TAHER_El_Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Mea_ Profile Picture

Mea_ 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans