web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

How to add comment throw report request page?

(0) ShareShare
ReportReport
Posted on by 397 User Group Leader

Hello,

does anyone have experience how to add a comment throw the report request page on to the printed report?

The field "AddComment" is provided in the table where the data is obtained.

field(9; AddComment; Text[200]) //For reports to get an additional description/comment.
        {
            Caption = 'Additional Comment';
        }

To show the field in the request page:

pastedimage1657606216153v1.png

pastedimage1657606311829v2.png

So the question is how to I play the entered comment back into the table/field to use it in the report. Save the entered comment throught the request page to the record.

Thank you guys!

Tom 

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    127 on at
    RE: How to add comment throw report request page?

    So the user sets a comment before they see the report? Adding comments to reports is standard Powet BI btw - whilst looking at the data visuals.

    Maybe try setting the value from the request page to a variable and display that in the output. Then using the Onpost trigger set the value in the table with the stored variable.

  • Suggested answer
    Vaishnavi J Profile Picture
    3,062 on at
    RE: How to add comment throw report request page?

    Hi

    Below is pseudo code for the same.

    Trigger OnPreReport()

    Var Rec_XYS: Record XYZ;

    begin

    Rec_XYS.Setrange(No, PK)

    if RecXYS.findfirst () then

    RecXYS.Comment:= AddComment;

    RecXYS.Modify(true);

    end;

    if your table is posted entries table then you have to add permission as well for RIMD for that table. 

    once you have set the value in table you can use it as field/column in your report and then show it on report.

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much

  • T_Mauser Profile Picture
    397 User Group Leader on at
    RE: How to add comment throw report request page?

     Vaishnavi Joshi thank you! One problem I had with your solution is that the record (which ccome from the report.run()) wasn't initialized at this point (OnPreReport()) -> OnPostReport() works :D

     JAngle everything works now! -> had to change the variable in the column as you said with a global variable.

    Thank you both for your quick response!

    Cheers

    Tom

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,915

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,011 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,989 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans