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
0
Comments
In my database at least, Report 206 - Sales Invoice contains the following line of code in the "Sales Invoice Header" OnAfterGetRecord trigger: 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...
: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!