Skip to main content

Notifications

Announcements

No record found.

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 

  • T_Mauser Profile Picture
    T_Mauser 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
    Vaishnavi J 3,056 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
    JAngle 46 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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,703 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,433 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans