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 :
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.

I have the same question (0)
  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    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;

  • AXx Profile Picture
    95 on at

    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

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi,

    Were you able to resolve the issue?

  • AXx Profile Picture
    95 on at

    No

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

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

  • AXx Profile Picture
    95 on at

    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\

    .

  • AXx Profile Picture
    95 on at

    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.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    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?

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 584 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 499 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 254 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans