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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

skip those Record witch debit credit equal

(0) ShareShare
ReportReport
Posted on by 385

how to skip those record where debit credit is equal

in vend account statement

please send me code  

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    kindly provide two things

    1) path of vendor account statement

    2) define word 'SKIP' ; does that means do not disply on report or what?

  • Azam Profile Picture
    385 on at

    Thanks  Sohaib Cheema  your Response

    yes do not display on report

    AP>Report>Transaction>Vendor>Account Statement

    DP class Name VendAccountStatementIntDP

  • Suggested answer
    Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    AOT\Classes\VendAccountStatementIntDP\processReport

    Add a range here with expression as

    where debit != creadit

    you can dd range on query with syntex as demonstatted here in two examples

    Example1

    Example2

  • Azam Profile Picture
    385 on at

    I am not understanding how to add rage kindly give me range code

  • Azam Profile Picture
    385 on at

    how to add range because two field amountCur, amountDeb in vendTrans table

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    Read again my previous reply, read Example refered previously.

    Do little work on that by reading and then come here if you face any isuue, by showing what yolu have done till now

  • Azam Profile Picture
    385 on at

    if (withoutSettlement )

       {

       query.dataSourceTable(tableNum(LedgerJournalTrans), 1).addRange(fieldNum(LedgerJournalTrans, AmountCurCredit)

       ,fieldNum(LedgerJournalTrans, AmountCurDebit)).value(queryvalue(credit!=debit));

       }

    I am using this

    when i execute report then error occurred

    (Query object not initialized.

    Stack trace

    (S)\Classes\VendAccountStatementIntDP\processReport - line 44

    (S)\Classes\SrsReportRunRdpPreProcessStrategy\execute - line 27

    (S)\Classes\SrsReportRunRdpPreProcessStrategyTempDB\execute - line 6

    (S)\Classes\SrsReportRunRdpPreProcessService\executeWithContract - line 82

    (S)\Classes\SrsReportRunRdpPreProcessService)

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    well, though i dont have time, i have spent few minutes and found two points reagrding your issue

    1) There is nothing called debit credit in the Table which is being used behind the report. The origion of data for this report is actually VendTrans and in table VendTrand only field which does matter is AmountCur

    Might be you are able to see AmountCur on report as Debit and Credit columns but in fact the information is saved in single column known as AmountCur

    Now your requirement is to skip those rows where debit is equal to credit. You will never find such rows because amount is saved in single column

    2) if you have any customized columns for debit/credit you can code for range in follwing path

    \Classes\VendAccountStatementIntDP\initVendTransQuery

    and you code should be something as follwing

    queryBuildRange = vendTransDataSource.addRange(fieldNum(VendTrans,AmountCur));
        queryBuildRange.value(strFmt('((%1 != %2))',
                    fieldStr(VendTrans, AmountCur),
                    queryValue(100)                
                    ));
    


  • Azam Profile Picture
    385 on at

    after use this code did not any change

    how is it possible

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    seems you did not read, part-1 of reply and i cannot hear anything from your side, how you are managing 2 columns for debit and credit, so helping you, without knwoing, is not feasible.

    Hopefully, if you can provide us details, we can help you.  

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans