Skip to main content

Notifications

Business Central forum
Unanswered

Dataitem in report extensions

Posted on by 20
Hi all,

I have created a report extension, to get data from another table. In this report extension I have added the dataitem Sales Comment Line and this is linked to the Sales Header. 
Thereafter, I have downloaded the standard RDLC report and copied it in my extension and updated the dataset in the report. The Comment column is available. 
However, somehow I do not get the information from the sales comment line. Has someone an idea why it is not working? 
reportextension 60134 pickinstructieSchut extends /Pick Instruction/
{
    RDLCLayout = 'layouts/pickinstructieSchut.rdl';
 
    dataset
    {
        add(/Sales Header/)
        {
            column(ExternalDocumentNo; /External Document No./)
            {
                IncludeCaption = true;
            }
            column(Shipment_Method_Code; /Shipment Method Code/)
            {
                IncludeCaption = true;
            }
        }
        addlast(/Sales Header/)
        {
            dataitem(/Sales Comment Line/; /Sales Comment Line/)
            {
                DataItemLink = /No./ = field(/No./);
                DataItemTableView = sorting(/Document Type/, /No./, /Document Line No./, /Line No./) where(/Document Type/ = const(Order));
                column(Comment; Comment)
                {
                    IncludeCaption = true;
                }
 
            }
        }
        add(/Sales Line/)
        {
            column(Description2; /Description 2/)
            {
                IncludeCaption = true;
            }
            column(Item_Reference_No_; /Item Reference No./)
            {
                IncludeCaption = true;
            }
        }
        addlast(/Sales Line/)
        {
            dataitem(Item; Item)
            {
                DataItemLink = /No./ = field(/No./);
                DataItemTableView = sorting(/No./);
                column(Base_Unit_of_Measure; /Base Unit of Measure/)
                {
                }
            }
        }
    }
}
Categories:
  • Suggested answer
    Kamal Khakhkhar Profile Picture
    Kamal Khakhkhar 269 on at
    Dataitem in report extensions
    Hii There,
    As per your question you need to create report extension along with that you need to download the Report , Add your fields in report as per requirement and replace it with old layout.
    here i attach a blog, video for reference.
     
     
    If you found useful mark it answered.
     
    Thank You.
    Kamal Khakhkhar

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,818 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,147 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans