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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to use the "report" data type?

(0) ShareShare
ReportReport
Posted on by 92

Hello, I am doing an extension of the 1305 report, and I need to show an amount in letters, for which I am following the link below. I am new to Business Central, so some concepts are still not clear to me. How is the report data type supposed to be declared and used? Could you show me some code examples?

It is also not clear to me about the "check" subtype, am I supposed to create a variable that has both the "report" type and the "check" type? How do you do that?

community.dynamics.com/.../procedure-to-display-the-amount-in-words-in-a-report-of-microsoft-dynamics-nav

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    150 on at

    It would be similar to declaring a codeunit var and then calling a procedure. So in the report extension declare a new procedure which has a var of type report for the report 1401 aka Check plus the other required variable. The report is just being used to produce the required value. You could take a copy of the function and put it in the report or just in a codeunit.

  • Verified answer
    Tabrez Ajaz Profile Picture
    787 on at

    Hi BchM,

    You can declare a local/global variable using var keyword as shown below:

    var

           RepCheck: Report "Check";

           NoText: array[2] of Text;

           AmountInWords: Text;

    In your case, as you want to display the amount in words the above global variable will help you, the above-mentioned variables are described as follows:

    (1) RepCheck is a variable of  Report DataType Named as "Check" which is 1401.

    (2) NoText is a variable of DataType "Text" with array Dimension value as 2 which is defined as shown above.

    (3) AmountInWords is a variable of DataType "Text" which will store final result of amount in words.

    After declaring the global variables, now you can write your code in OnAfterGetRecord() trigger of DataItem in case of a report or wherever you want to use..

    trigger OnAfterGetRecord()

    var

    begin

      RepCheck.InitTextVariable();

      RepCheck.FormatNoText(NoText, yourDecimalAmountValueFieldOrVariable, CurrencyCode);

      AmountInWords := NoText[1];

    end;

    Now you will have the amount in word in your AmountInWord 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,965 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,125 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 961 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans