Amount In word - Nav 2009

Hello All,

I want to print amount in word on Purchase and sales Invoice. After searching on forum I found that Report 1401 (check) having that function to convert amount in word.

I am using Nav 2009. After studying it, I found that it accepts text array and return amount in word in array.

But I am not able to figure out how call this function to show amount in word.

On purchase invoice I took two variable, 1 = text array adn 2 = 1401 Report variable.

Can anybody guide me the steps after that for NAV 2009 (SSRS Report).

Regards.

Dear Asim,

If you would like to use the rpt 1404 amount to text methods, you need to copy the following functions, variables into your process.

functions, do you need:

Name

FormatNoText - this is convert your number to Text

AddToNoText - this is build the ones, tens, hundreds, exponents, etc

InitTextVariable - this is need to run at the beginning, this function is get the Text constants into your variables

variables do you need:

Name DataType Subtype Length

OnesText Text 30

TensText Text 30

ExponentText Text 30

DescriptionLine Text 80 - dimension 2

Do you neeed the Text Constants to copy:

From Text026 to Text029, Text032 to Text061. As you can see, these are the Text of your numbers.

When you implement these into your solutions, you can call them for example like this:

In a codeunit, OnRun() method:

InitTextVariable;
FormatNoText(DescriptionLine,256.45,‘EUR’);
MESSAGE(DescriptionLine[1]);

In Summary, the FormatNoText is checking how many ones, tens, hundreds do you have and calling the AddToNoText to build them together.

I tried to explain it clear, but it is more complex. It is math :slight_smile:

Rgds,

A

Hi A,

The solution is explained very well.

As per ur suggestion, if I create code unit for the same functionality, how to call that code unit from report.

As I want to show Amount in word on report and as per my understanding we dont have any event / trigger in NAV 2009 (SSRS) reports.

Regards.

Hai Asallai nice solutions … Keep it Thanks [;)]

Asim,

I think You can use the same step in reports also… no need to create a new code unit …

Hello Akhilesh,

I have created same steps in one new report.

But i am not able get how to call that function.

Regards.

Dear Asim

Go to report and call that function

eg:

Sales Line, Footer (1) - OnPreSection()

InitTextVariable;
FormatNoText(DescriptionLine,“Sales Line”.Amount,‘EUR’);

After then put a text box to the report

change the text box’s SourceExpr to DescriptionLine[1]+’ '+DescriptionLine[2]

Save and run oki …[;)][;)][;)][;)][;)]

Thanks Asallai and Akhilesh,

It solves my problem.

Great Help!

Regards.

Thanks for this thread!!:slight_smile:

For my understanding:

  1. just add the functions, variables, text constants in your current report.

  2. then copy the codes inside the functions in report 1401 place it in your current report functions.

  3. call the function…

hmm?hehe

how to create amount in words in RDLC ?

you have to write the code in Classic

InitTextVariable;
FormatNoText(DescriptionLine,256.45,‘EUR’);

and show the DescriptionLine[1] in RDLC

ok mohana

thanks :slight_smile: