Captions in a report
poppins
Member Posts: 647
Hi everyone,
I am designing a report where the customer wants the caption to be like this: caption in language a/caption in language b.
For example, if language a =ENU and language b = FR, the caption for the field Name in the report would be Name/Nom.
What is the better way to do this: I am thinking of writing the combination directly in the report designer, but is there a way to achieve it through NAV text constants?
Thanks in advance
I am designing a report where the customer wants the caption to be like this: caption in language a/caption in language b.
For example, if language a =ENU and language b = FR, the caption for the field Name in the report would be Name/Nom.
What is the better way to do this: I am thinking of writing the combination directly in the report designer, but is there a way to achieve it through NAV text constants?
Thanks in advance
0
Answers
-
Once you know which language the report should be printed in use CurrReport.LANGUAGE :=... to change to this language. After setting the language with CurrReport.LANGUAGE all text constants field captions etc. will show in this language.0
-
The caption information for fields cannot be easilly extracted during the runtime, there is no buildin function to get a field caption a language other than the current language (either default client language or set via CurrReport.LANGUAGE call)
The workaround I could think of is to build a generic empty report, having only one a function retrieving current field caption:GetCurrCaption(TableNo, FieldNo) RecRef.OPEN(TableNo) FieldRef := RecRef.FIELD(FieldNo); Exit(FieldRef.CAPTION)
Then in your code use that to get captions for the field in desired languageLanguageExtractReport.LANGUAGE('FRA'); MyFRCaption := LanguageExtractReport.GetCurrCaption(myTableId, MyFieldNo);Its just an idea, haven't tried it myself.
Slawek Guzek - www.yitron.co.uk
Business Central, MS SQL Server, Wherescape RED;0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
