Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Show ItemName In InventValueReport in AX 2012

(0) ShareShare
ReportReport
Posted on by 95

hi expert, i have small question, i want to Show new field (item name) in invent value report, for this i do following customization 

1 . add new field with name ItemName in InventValueReportTmpLine table .

2. also reference it in InventValueReportDP  class in method getInventValueReportTmpLine. i.e

str ItemName;

also note that in this method there is macro used.

#LOCALMACRO.GroupByFields
TransactionId,ItemName
ResourceType,
ResourceGroupId,
ResourceId,

........................

#ENDMACRO

insert_recordset inventValueReportTmpLineTmp
(
#GroupByFields

.........

}

select  #GroupByFields

.....

then after it also it reference it in InventValueReportPopulateItem method findReportLine

tmpReportLine.ItemName          =_inventTable.itemName();

}

 but data are not fetching in newly created field,

please guide me.

Regards.

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Show ItemName In InventValueReport in AX 2012

    Yes. That's why we were trying to do an update_recordset with a join, so that the performance is better.

    Methoid\getInventValueReportTmpLine Line 21 belongs to the macro declaration. Right?

  • AXx Profile Picture
    95 on at
    RE: Show ItemName In InventValueReport in AX 2012

    Problem Solved:

    In InventValueReportPopulateItem Class > FindReportLine > Add this method InventTable::find(tmpReportLine.ResourceId).itemName(). It will retrieve all data but it takes time to display result.

  • AXx Profile Picture
    95 on at
    RE: Show ItemName In InventValueReport in AX 2012

    yes But it shows this error when I run report

    Error executing code: Wrong type of FIND argument.

    Stack trace

    (S)\Classes\InventValueReportDP\getInventValueReportTmpLine - line 21

    (S)\Classes\DictClass\callObject

    (S)\Classes\SRSReportDataTable\getRecord - line 14

    (S)\Classes\SrsReportProviderQueryBuilder\addCursorToQueryRun - line 13

    (S)\Classes\SrsReportProviderQueryBuilder\getQueryRun - line 26

    (S)\Jobs\

    .

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Show ItemName In InventValueReport in AX 2012

    Did you remove the other changes you did and perform an incremental CIL?

  • AXx Profile Picture
    95 on at
    RE: Show ItemName In InventValueReport in AX 2012

    No

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Show ItemName In InventValueReport in AX 2012

    Hi,

    Were you able to resolve the issue?

  • AXx Profile Picture
    95 on at
    RE: Show ItemName In InventValueReport in AX 2012

    I have done in this way , it compiles fine , but when i run the report its gives Follwing error

    Error executing code: The record buffer is NULL.

    Stack trace

    (S)\Classes\InventValueReportDP\getInventValueReportTmpLine - line 20

    (S)\Classes\DictClass\callObject

    (S)\Classes\SRSReportDataTable\getRecord - line 14

    (S)\Classes\SrsReportProviderQueryBuilder\addCursorToQueryRun - line 13

    (S)\Classes\SrsReportProviderQueryBuilder\getQ

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Show ItemName In InventValueReport in AX 2012

    Hi,

    You can try updating the itemName in the InventValueReportDP\getInventValueReportTmpLine method -

    InventTable InventTable; //Do this in the declarations part
    
    
    update_recordSet inventValueReportTmpLineTmp
            setting ItemName = inventTable.itemName()
                join inventTable 
                    where inventTable.itemId == inventValueReportTmpLineTmp.resourceId;

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,140 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,895 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans