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)
  • 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

  • Suggested answer
    Vaishnavi J Profile Picture
    3,060 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

  • Suggested answer
    JAngle Profile Picture
    117 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.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 3,864

#2
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,185

#3
Sumit Singh Profile Picture

Sumit Singh 2,850

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans