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

Comment in Sales Line not showing in report

(0) ShareShare
ReportReport
Posted on by 80

Hi All,

I need help again. I'm running a report which is a copy of the standard Pro Forma Invoice. I noticed that in Sales Line, the "Comment" type is not showing. 

2287.PNG

I looked into the Pages Inspection in BC to check what is the type of this comment, it is (Space).

In the report, in Sales Line dataitem, on the OnAfterGetRecord() trigger is added a condition:

 if Type = Type::" " then begin
Message('Sample');
end;
To my surprise, it doesn't goes inside this condition. Is there an explanation why it doesn't include the Comment line or is there any configuration so that comment thing will appear in reporting.
Thanks
  • Lino Asmolo Jr Profile Picture
    80 on at
    RE: Comment in Sales Line not showing in report

    Hi Josh Anglesea,

    I think youre right, i forgot to check the predataitem. Actually, i already copy the standard report code, so  i can add custom fields there.

    Thanks

  • Suggested answer
    jerome77 Profile Picture
    on at
    RE: Comment in Sales Line not showing in report

    Hi

    I wonder if standard text code could workaround this.. I did not test, maybe good to check..

    Hope helpful

    Kind regards

    Jerome

  • Suggested answer
    JAngle Profile Picture
    89 on at
    RE: Comment in Sales Line not showing in report

    The predataitem trigger for the sales lines does a filter on type::item so you will never see any other line type as that trigger is hit before the onaftergetrecord. This is needed as the onaftergetrecord does a .GET on the item table only.

    To get what you want copy the report code and create a new one if you’re cloud. I would still do this for on prem too.

  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: Comment in Sales Line not showing in report

    Hello,

    Without going into details, could it be that this is an internal field not to be shown on the report itself? That was my first wild guess. But documentation indeed confirms this:

    docs.microsoft.com/.../across-how-use-comments

    It does state the following:

    Note

    Comments are not printed or output to reports or externally-facing documents.

    That said, this is by design. If you want the standard behavior to be different, write some code adjustment.

    Thanks.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
YUN ZHU Profile Picture

YUN ZHU 491 Super User 2025 Season 1

#2
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 358

#3
Mansi Soni Profile Picture

Mansi Soni 327

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans