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

How to Print Service Comments on the Service Invoice RDLC report?

(1) ShareShare
ReportReport
Posted on by 73
I created an extension for the "Service Invoice-Sales Tax" RDLC report 10474, so I can show the General Comments on a Service Invoice that gets printed and sent to the customer
 
 
I tried to add the comment from the Service Invoice Header DataItem, but this is a boolean value. How can I get the service comments onto the service invoice report? 
 
 
reportextension 50122 "Service Invoice Report" extends "Service Invoice-Sales Tax"
{
    dataset
    {
        add("Service Invoice Header")
        {
            column(ServiceInvoiceGenComment; Comment ) { }
            column(ServiceInvoiceGenCommentLbl; Service_CommentsLbl) { }
        }
    }
 
    var
 
        Service_Comments: Text;
        Service_CommentsLbl: Label 'Service Comments';
}
 
 
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 on at
    This is another table. You have two options.
    1. Add a new dataitem to get the data.
    2. Just add columns and then get the data in the report trigger.
    You just added two fields on the Service Invoice Header, so it is different from what you think. . . .
    I recommend the first method, which is much simpler.
    For example, like this.
     
    Hope this can give you some hints.
    Thanks.
    ZHU
  • ERPlatanos Profile Picture
    73 on at
    Thanks for the reply Mr Zhu,
     
    I'm unsure how this is specifically linked, though. The Service Header, Service Invoice Header, Service Invoice Line tables don't hold the comment field. The one in my code below is a boolean
     
    reportextension 50122 "Service Invoice Report" extends "Service Invoice-Sales Tax"
    {
        dataset
        {
           
            addlast("Service Invoice Header")
            {
                dataitem(Line; "Service Header") {
                    DataItemLink = "No." = field("No.");
                    DataItemLinkReference = "Service Invoice Header";
                    column(ServiceInvoiceGenComment; Comment) { }
                    column(ServiceInvoiceGenCommentLbl; Service_CommentsLbl) { }
                }
               
            }
     
        }
     
        var
            Service_Comments: Text;
            Service_CommentsLbl: Label 'Service Comments';
    }
  • Suggested answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 on at
    Hi, You can refer to the standard code and try the following processing.
     
    Thanks
    ZHU
  • ERPlatanos Profile Picture
    73 on at
    I appreciate the help Mr Zhu,
     
    I'm struggling to understand the syntax used from the standard code and how to use it on the Report Extension
     
    I'm trying to use "RunObject" but an error is thrown saying it cannot be used in this context.
     
    addlast("Service Invoice Header")
            {
                dataitem(Header; "Service Comment Line") {
                    // DataItemLink = "No." = field("No.");
                    // DataItemLinkReference = "Service Invoice Header";
                    RunObject = Page "Service Comment Line";
                    RunPageLink = Type = const(General),
                                "Table Subtype" = const(Comment),
                            "Service Invoice Header"."No." = field("No.");
                    column(ServiceInvoiceGenComment; Comment) { }
                    column(ServiceInvoiceGenCommentLbl; Service_CommentsLbl) { }
                }
               
            }
     
    I also cannot Use "Type" or" Table Name" on a DataItemLink
     
    addlast("Service Invoice Header")
            {
                dataitem(Header; "Service Comment Line") {
                    // DataItemLink = "No." = field("No.");
                    DataItemLink = Comment
                    DataItemLinkReference = "Service Invoice Header";
                    // RunObject = Page "Service Comment Line";
                    // RunPageLink = Type = const(General),
                    //             "Table Subtype" = const(Comment),
                    //         "Service Invoice Header"."No." = field("No.");
                    column(ServiceInvoiceGenComment; Comment) { }
                    column(ServiceInvoiceGenCommentLbl; Service_CommentsLbl) { }
                }
               
            }
  • Suggested answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 on at
    Sorry I didn't make it clear, what I meant was to add the reference filter condition to the DataItemLink...
    I personally suggest that you find an experienced partner to do customzation together.
     
    Thanks.
    ZHU

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 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans