How to call class from report

Hello everyone,

I added one Real control on to report which display the conversion.

I want to use class available for this conversion.

how do I call class in a a report and display it .

Thanks

What is your AX version? Is that a SSRS report?
What kind of conversion you are talking about?

Hi Adnan,

Create the instance of the class and call ur method from the class…Pls give more details…

Why don’t you simply convert the data before calling your form? Callbacks to AX are both complicated and slow, so you’re trying to do something complex to make your report worse than if you use the usual, simple way.

conversion of Inventory unit to Purchase unit.

I want to display Onhand of an item with inventory unit as well as purchase unit in the report.for which I want to call the class \Classes\InventItemUnitConvert\

So what is stopping you to do that?

Mr.Kranthi,
I added real column to the report (purchqty).now how do I use this class to display the onhand of purchqty.

InventItemUnitConvert unitConvert;
;

unitConvert = InventItemUnitConvert::newNoParameters();
unitConvert.qty(100, ‘inventoryUnit here’, ‘PurchUnit here’, ‘ItemId Here’); // 100 is your qty in inventory unit

You can write a display method in your table related to this report. This display method can call your class to get the data as you require. Display method can be added on the SSRS report as a field to show the output of the method.