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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Separate the quantity field in InventTrans table

(0) ShareShare
ReportReport
Posted on by

i need to separate the quantity field in InventTrans table to be two fields, one for Positive quantity and another to Negative quantity.  

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at

    It doesn't sound like a good idea, because you would have to change the whole inventory management in AX.

    Can you tell us what business requirement you're trying implement by splitting the quantity field?

  • Community Member Profile Picture
    on at

    i need to create a new report to show item transaction, but i need to show all positive quantities in column and all negative quantities in another...

    i already create the below display method but the result not correct.

    display real QtyPos()

    {

       if(InventTrans_1.Qty >0)

           QtyPos = InventTrans_1.Qty >0;

       else

           QtyPos = InventTrans_1.Qty >0;

       return QtyPos;

    }

  • Suggested answer
    Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at

    Create two methods - one will return positive quantities and one negative quantities.

    It would also say that your display method isn't correct. It should get InventTrans buffer in a parameter, shouldn't it? Of course I can't know where you put the method unless you tell me that.

  • André Arnaud de Calavon Profile Picture
    304,711 Super User 2026 Season 1 on at

    Hi Islam,

    I do fully agree with Martin. Assuming you have an active buffer you are now only filling a true or false in the QtyPos field (QtyPos = InventTrans_1.Qty >0)

    When using two display methods, it would be something like this:

    display InventQty QtyPos()

    {

       InventQty    qtyPos;

       if (InventTrans_1.Qty >= 0)

           qtyPos = InventTrans_1.Qty;

       else

           qtyPos = 0;

      return qtyPos;

    }

    display InventQty qtyNeg()

    {

       InventQty    qtyNeg;

       if (InventTrans_1.Qty < 0)

           qtyNeg = InventTrans_1.Qty;

       else

           qtyNeg = 0;

      return qtyNeg;

    }

    Depending if you need to reverse the sign, you can change the QtyNeg. Note that the else might not be needed if you keep the qtyPos and qtyNeg as local variables.

  • Sohaib Cheema Profile Picture
    49,679 Super User 2026 Season 1 on at

    You may also change it on SSRS design level only, using expression

    For -ve column

    =IIf(Fields!SomeField.Value < 0, Fields!SomeOtherField.Value, 0)

    For +ve column

    =IIf(Fields!SomeField.Value > 0, Fields!SomeOtherField.Value, 0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans