Set language in report

ghyczy
Member Posts: 5
newbie needs help
:shock: We've made an invoice report in report designer. Invoice is based on the tables:
* sales invoice header
* sales invoice line
* company information
We would like to have the report be set in the proper language. The to be selected language needs to be linked to the country (Bill-to Country Code).
Is it possible to set the language within the C/AL Code of the first table (in OnPreDateItem) based on the Country set in the sales invoice header???
Thank u all
:shock: We've made an invoice report in report designer. Invoice is based on the tables:
* sales invoice header
* sales invoice line
* company information
We would like to have the report be set in the proper language. The to be selected language needs to be linked to the country (Bill-to Country Code).
Is it possible to set the language within the C/AL Code of the first table (in OnPreDateItem) based on the Country set in the sales invoice header???
Thank u all
0
Comments
-
When in doubt, I always look at equivalent Navision reports...
In my database at least, Report 206 - Sales Invoice contains the following line of code in the "Sales Invoice Header" OnAfterGetRecord trigger:CurrReport.LANGUAGE := Lang.GetLanguageID("Language Code");
To use this code in your report, you need to define 'Lang' as a C/AL Global variable, type 'Record', sub-type "Language"...
Note that this report uses the "Language Code" that already exists on the "Sales Invoice Header".
You have indicated that you want to set the CurrReport.LANGUAGE in the OnPreDataItem trigger of the "Sales Invoice Header". The problem with this strategy is that the first Sales Invoice Header record has not been read from the db yet, so the Sales Invoice Header record will contain all blanks...0 -
Thanx fb, good point u have....
:roll:
Just got introduced to navision 3 weeks ago, to reporter 1 week ago, so I have 2 find my way around
But ur suggestion works fine, so thanks for that!0
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