Skip to main content

Notifications

Announcements

No record found.

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

  • Azam  Profile Picture
    Azam 385 on at
    RE: skip those Record witch debit credit equal

    how solve it

    Cannot select a record in Vendors (VendTable). Name: 0.

    The SQL database has issued an error.

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: skip those Record witch debit credit equal

    Definately In X++ if you want to bring only unique vouche numbers, you have to group by as under

    vendTransDataSource.orderMode(OrderMode::GroupBy);

    vendTransDataSource.addGroupByField(fieldNum(VendTrans, Voucher));

  • Azam  Profile Picture
    Azam 385 on at
    RE: skip those Record witch debit credit equal

    if we use sql select statement  if two voucher have same no then skip this voucher

    is possible in x++

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: skip those Record witch debit credit equal

    so, how debit and credit can be equal at same time? if information is being saved in one column.

    come out of FINANCE World

    this logically, if information is being saved in a single column, is that any concept of TWO Values??? No

    value will be one only

    is it possible to have two values(Real Number Type) in a single celll of excel? No

    same is the case. so how we can think to compare two values of a single cell.

    Please reconsider your requirement  to know what is the real requirement

  • Azam  Profile Picture
    Azam 385 on at
    RE: skip those Record witch debit credit equal

    yes I read Part One ,

    debit , credit is  in one field of VendTrans

    amount Cur

    how to skip those record

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: skip those Record witch debit credit equal

    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.  

  • Azam  Profile Picture
    Azam 385 on at
    RE: skip those Record witch debit credit equal

    after use this code did not any change

    how is it possible

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: skip those Record witch debit credit equal

    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
    Azam 385 on at
    RE: skip those Record witch debit credit equal

    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
    Sohaib Cheema 46,610 User Group Leader on at
    RE: skip those Record witch debit credit equal

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans