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)

Unitconversion in SSRS

(0) ShareShare
ReportReport
Posted on by 636

Hi All, 

I need to display the Sales Unit and Onahand quantity in sales unit in report. I have created those fields in the temptable and below code is being used to store the sales unit.

While Select UnitId from InventTableModule where TmpinventTrans.ItemId == InventTableModule.ItemId
&& ModuleInventPurchSales::Sales
{
TmpinventTrans.SalesUnit = InventTableModule.UnitId;
}

how can I show the quantity in the sales unit after applying unit conversion if available.

I am using a method to have on-hand value and storing as TmpInventTrans.onhandphysical.  just need the code for applying unit conversion and to display the data as TmpinventTrans.salesqty. 

If( SalesUnit!= 'Kg')

{

------------ ?

}

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    You can call UnitOfMeasureConverter::convert to do the conversion.

  • D365  beginner Profile Picture
    636 on at

    Thanks Mr. Nikolaos,

    Can you please explain how the syntax should be as per the above details since i have tried the same already but didn't work.

  • Suggested answer
    Sukrut Parab Profile Picture
    71,735 Moderator on at
  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    it should be like

    qty = UnitOfMeasureConverter::convert(tmpInventTrans.onhandphysical,
    UnitOfMeasure::unitOfMeasureIdBySymbol('Your invetory unit'),
    UnitOfMeasure::unitOfMeasureIdBySymbol(InventTableModule.UnitId), //sales unit
    NoYes::Yes,
    InventTable::itemProduct(tmpInventTrans.ItemId));

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans