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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to display Item Net Weight

(0) ShareShare
ReportReport
Posted on by

Hi All,

I am trying to display Item Net weight on a delivery Note. For that I am trying to write a method. Not sure what wrong I am doing

//BP Deviation documented
display ItemNetWeight NetWeight()
{
    ;

    return ItemNetWeight.inventTable().ItemNetWeight;

Can anyone help?

Thanks in advance

*This post is locked for comments

I have the same question (0)
  • Rohin Profile Picture
    4,624 on at

    Hello ,

     Where are writing this code  ? on Report ?

     your code is like that :

    return ItemNetWeight.inventTable().ItemNetWeight;

     what is  "ItemNetWeight"(showing Bold)   ?

    could you please specify ?

    Thanks

  • Community Member Profile Picture
    on at

    Hi Visvash,

    Yes, I am writing this code for a report. I want to display Net Weight for an Item in inventory Module on this report.

    Not sure if you work on AX but if you do and look up in Invent Table, there is field called Net Weight.

    Hope this explains!

  • Rohin Profile Picture
    4,624 on at

    Hello Parz,

     I think you don't understand my comment. sorry for that.

      I know NetWeight is field in InventTable. My question is how do you get InventTable() method from ItemNetWeignt (bold in my above comment) ? what is That Bold "ItemNetWeight " is it Report control Field?

    is this SSRS Report ? could you specify the Name of Report ?

    Thanks.

  • Community Member Profile Picture
    on at

    I am not sure if I still understand your question!! Sorry about that !!But I am trying to add this field to SalesPackagingSlip!!

  • Suggested answer
    Rohin Profile Picture
    4,624 on at

    I am sorry , i havn't see that you are working on Ax2009 . I was thinking that you are working on AX 2012 so i was asking acc. to that. No issue .

    You have two options to display your field on Report :

    1. Write  Display Method on Table (DataSource of Your Report)

    2. Write Display Method on Report (as you are doing)

    but you have to write first Select statement in display method with your DataSource Table (Report DataSource)  with InventTable and then you can get only Your Field from InventTable .

    I hope you understand now . Please tell if you need more explanation.

    Thanks.

  • Verified answer
    Rohin Profile Picture
    4,624 on at

    You can try this code on report  :

    display ItemNetWeight  ItemNetWeight()

    {

    InventTable   inventtable;

    ;

    select inventtable where inventtable.ItemId == custpackingsliptrans.ItemId;

    return inventtable.NetWeight;

    }

    this works for me .

    thanks.

  • Suggested answer
    Faqruddin Profile Picture
    1,883 on at

    Hello Parz,

    Write below code on CustPackingSlipTrans table and call in your report.

    public ItemNetWeight itemNetweight()

    {

    InventTable inventTable;  

    select NetWeight from inventTable where inventTable.ItemId == this.ItemId

        && inventTable.dataAreaId == this.dataAreaId;

       return inventTable.NetWeight;

    }

  • Suggested answer
    Community Member Profile Picture
    on at

    You are a genius!!! Thank you so much it worked for me too!! Thanks so much for all your help.

  • Suggested answer
    Community Member Profile Picture
    on at

    Thanks you

  • Rohin Profile Picture
    4,624 on at

    Hi Parz,

    If your issue is solved you can mark answer that helped you as verified to close this thread.

    Many Congrats!

    Thanks.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans