Dispay the Amount converted to Words in the Report Body

Chetan
Member Posts: 15
Dear Experts,
I am designing a document report. I am successfully able to retrieve Company & Customer details and display on the Report header. Also, I am able to retrieve item details and display on the Report body.
One of the user requirement is to convert total amount and display in words. I have converted the amount into words using Check->Report, but my issue is I am not able to display same on Report body.
I have defined an variable AmountInWords in DataItem - "Sales Invoice Line".
I am calculating the sum of row amount in "Sales Invoice Line" - OnAfterGetRecord() and I am assigning the final amount to AmountInWords in "Sales Invoice Line" - OnPostDataItem().
Could any help me, why am I not able to display the amount converted to word in the report header. Many Thanks for your help in advance.
I am designing a document report. I am successfully able to retrieve Company & Customer details and display on the Report header. Also, I am able to retrieve item details and display on the Report body.
One of the user requirement is to convert total amount and display in words. I have converted the amount into words using Check->Report, but my issue is I am not able to display same on Report body.
I have defined an variable AmountInWords in DataItem - "Sales Invoice Line".
I am calculating the sum of row amount in "Sales Invoice Line" - OnAfterGetRecord() and I am assigning the final amount to AmountInWords in "Sales Invoice Line" - OnPostDataItem().
Could any help me, why am I not able to display the amount converted to word in the report header. Many Thanks for your help in advance.
Chetan
Bangalore
Bangalore
0
Answers
-
if I understand correctly, you are able to convert the amount to text but it is not printing on the header, could you let me know are you using Code.Setdata, Getdata functions to print the "Amountinwords" in the report header?0
-
Hi NAVRS,
Thanks for your response.
Actually I have used SetData & GetData for Company & Customer details in report header.
Please make a correction to above statement, I want to print the Words in the Report Body.
When I assign the required words to AmountInWords variable, it is not passed to it in the DataSet(Report Screen -> Help -> About This Report).
Could you please through some light on this. Many Thanks.Chetan
Bangalore0 -
Can you check are you able to get the Amountinwords in NAV, if yes then check the last line of the dataset (use the last(fields!Amountinwords.value)) to display on the report0
-
When I debug, I can see that variable is assigned the value. But when passed to the report dataset it is not applied their.
I am having only one record, hence cannot consider Last(fields!Amountinwords.value) also.Chetan
Bangalore0 -
if the value assigned to Amountinwords then it should pass to the dataset, (can you display message for Amountinwords so you can easily know)
in which dataitem you have placed the Amountinwords textbox
can you check placing the code and amountinwords text box OnAfterGetRecord of SalesInvoiceline0 -
I guess, since I have passed the value in the OnPostDataItem I am not getting the value in the dataset and also I have only one record, hence I cannot use last value too.
I have tried placing the AmountInWords variable in both "Sales Invoice Header" and "Sales Invoice Line" and have no result.
If I place the code in OnAfterGetRecord, it will print the totalamount for each record in that sales invoice line which I dont want.Chetan
Bangalore0 -
ok then try placing the code on Sales invoice line Post dataitem and the Amountinwords in the Header dataitem0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions