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

Posted Invoice Report RDLC (10074) - How to Remove (or not show) the contact name in the address

(5) ShareShare
ReportReport
Posted on by 96
Hi!
 
 
I have the same question as this one Custom Layout Reports Bill To fields - I want to remove the Contact name from showing in the BillTo Address.
If I hide the field (that usually show the contact) in the report, the first line of the address is not showing if there is no contact in the customer...
 
But we are in 2025 now, is there any other way to manage that, or do I still need to change the Codeunit: 365 Format Address?
 
Thanks!
 
Marilyn
I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,247 Super User 2025 Season 2 on at
    You can subscribe to the below event 
     
    OnBeforeSalesInvBillTo(AddrArray, SalesInvHeader, Handled);
     
    Add the below code and it should blank 
     
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Format Address", OnBeforeSalesInvBillTo, '', false, false)]
        local procedure "Format Address_OnBeforeSalesInvBillTo"(var AddrArray: array[8] of Text[100]; var SalesInvHeader: Record "Sales Invoice Header"; var Handled: Boolean)
        var
            FormatAddr: Codeunit "Format Address";
        begin
     
            FormatAddr.FormatAddr(
                AddrArray, SalesInvHeader."Bill-to Name", SalesInvHeader."Bill-to Name 2", '', SalesInvHeader."Bill-to Address", SalesInvHeader."Bill-to Address 2",
                SalesInvHeader."Bill-to City", SalesInvHeader."Bill-to Post Code", SalesInvHeader."Bill-to County", SalesInvHeader."Bill-to Country/Region Code");
            Handled := true;
        end;
       
        
  • Verified answer
    Valentin Castravet Profile Picture
    31,505 Super User 2025 Season 2 on at
    You can modify the Contact Address Format in the Countries/Regions page to display the contact name last. Then, you can hide the last address field containing the contact name. 
     
     
     
  • Suggested answer
    YUN ZHU Profile Picture
    95,748 Super User 2025 Season 2 on at
    This array of addresses is really annoying.
    I think another simple solution is to just remove the field from the layout.
     
    Thanks
    ZHU
  • Suggested answer
    Ramesh Kumar Profile Picture
    7,529 Super User 2025 Season 2 on at
    believe removing the field from the layout should resolve the issue.
     
    If this helped you, please check the box Does this answer your question?
  • MG-03122127-0 Profile Picture
    96 on at
    The solution to change the country/region setup was accepted by my client, so I will go with this option.
    I haven't test the subscription to the event in the code unit, so I can't talk about this solution, but I guess it would have been the way to go if my client didn't want to change the position of the contact.
     
    For the others solutions about removing the field in the layout: it doesn't work.  Because the way this array of address is build, if the country/region is setup to have the contact name "after company name", this field will show the contact name OR the first line of address if the contact is empty.  Removing the field, means that the the first line of address won't show if the contact is empty...
     
    Thanks!
     
  • Suggested answer
    Valentin Castravet Profile Picture
    31,505 Super User 2025 Season 2 on at
    Great, thanks for the follow up!
     

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