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 :
Small and medium business | Business Central, N...
Suggested Answer

Report Extension Add Custom fields from other table to report dataset

(1) ShareShare
ReportReport
Posted on by 10
So basically i am attempting to create a report extension for Pick Instructions report.
I am attempting to add the LotNo field to the Pick Instructions Report via ReportExtension. I am able to get columns added from the pre existing tables. I am using DataItemLink and dataitem to display the lot No. with the following code. 
 
reportextension 50102 PickInstructionExt extends /Pick Instruction/
{
    dataset
    {
        add(/Sales Line/)
        {
            column(itemNo1; /No./)
            {
                IncludeCaption = true;
            }
        }
        addlast(/Sales Line/)
        {
            dataitem(/item/; /Item/)
            {
                DataItemLink = /No./ = FIELD(/No./);
                column(itemNo2; /No./)
                {
                    IncludeCaption = true;
                }
                dataitem(/Reservation Entry/; /Reservation Entry/)
                {
                    DataItemLink = /Item No./ = FIELD(/No./);
                    column(LotNumber; /Lot No./)
                    {
                        IncludeCaption = true;
                    }
                }
            }
        }

So the column I created being itemNo1 displays the No. however any column I try add in the addlast(/Sales Line/) always displays as blank. I added column itemNo2 to test to see if the issue is the way i linked from sales line to Lot No. However even the link from sales line to item and then grabbing the No. from item shows up blank. 

I am updating the report using microsft report builder and it is showing the columns I added in datasets. I have tried dragging directly from that to the report where it uses =First(Fields!LotNumber.Value)
I have also tried =Fields!LotNumber.Value with no success. Currently im just trying to see if I can pull anything at all from a table that isnt already in the pick instructions report. 
I dont even know where to debug any further haha
I have the same question (0)
  • Suggested answer
    Judy Profile Picture
    Microsoft Employee on at
    Hi, please refer to the old thread for the same topic:
    Best Regards,
    Judy
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,380 Super User 2025 Season 2 on at
    Hi,
     
    To add a field in report using report extension, you need to add a dataitem of the table and then add field from the data item.
     
    Regards,
    Saurav Dhyani
  • CS-08050546-0 Profile Picture
    10 on at
    For some reason it removed the description for my post. I have already attempted what has been mentioned by the reply's in the group. I've added back in the description

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,092

#2
YUN ZHU Profile Picture

YUN ZHU 663 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 515

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans