Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 25th March 2017, 11:53
BaBernd BaBernd is offline
Senior Member
 
Join Date: Mar 2015
Posts: 135
BaBernd is on a distinguished road
Baan: Infor 10.2.1 - DB: SQL-Server 2012 - OS: Windows Server 2008
Text field within MS-SSRS with differnt languages
Baan: ERP LN 6.1 FP8 (Infor ERP 10.2)
C/S: Client

Hello to All,

I like to print a Formular with help from Text-Manager fields in MS-SSRS (Report Builder) which contains text for different languages in the same Report. Especially normal user language (German, French and so on) and additional English text blocks with the same content.
For that we created text in the text manager which I will identify by the Keyword parameter in table tttxt002. And for any necessary language.

First I've created a report in LN as basic (see screenshots). There it is possible to change the language for a text field by changing it's Conditions "Lang/Curr.(expr)". So I've put in a field with user language and a second field with language code "2" for english.

But the next step was to print the Report in MS-SSRS cause of better layout options.
When I've created a IER-File (XML file) for the development in Report Builder all these tctxtn-fields was transfered with the user language.
Also if I had set the language$ parameter to english ("2") before I've assigned it to the fields.
But then I've could not use the Code.tt_getText(string fieldname) for display the text-fields for different languages. Only for the user language.

Do anyone has a better idea or is it possible to get the Code for tt_getText() to change it for additional language Parameter?

I hope I've descibed the situation in understandable manner.

Best Regards
Bernd

Another link I've found is nearly about a similar issue but not identical.
http://www.baanboard.com/baanboard/s...age#post200215

My code looks like that in the program script for the print session:

Code:
declaration:
extern domain tctxtn srvc.txt.500.lng
extern domain tctxtn srvc.txt.500.2
extern domain tclang hold.language

before.program:
	hold.language = language$

	srvc.txt.500.lng = read.formular.text("Servicetext 500", hold.language)

	language$ = "2"

	srvc.txt.500.2 = read.formular.text("Servicetext 500", "2")

	language$ = hold.language


functions:
function domain tctxtn read.formular.text(domain tttxt.kwrd i.kwd1, domain tclang i.lang)
{
	select tttxt002.ctxt
	from tttxt002
	where tttxt002.kwd1 = :ikwd1
	and tttxt002.clan = :i.lang
	selectdo
	endselect

	return(tttxt002.ctxt)
}
Attached Files
File Type: pdf Tctxtn-field for MS_SSRS.pdf (343.3 KB, 12 views)

Last edited by BaBernd : 25th March 2017 at 12:07. Reason: 1.) Adding PDF with Screenshots. 2.) changing code
Reply With Quote
  #2  
Old 27th March 2017, 09:22
JaapJD's Avatar
JaapJD JaapJD is offline
Guru
 
Join Date: Sep 2002
Location: Netherlands
Posts: 729
JaapJD will become famous soon enoughJaapJD will become famous soon enough
Baan: BaanIV, BaanERP, ERP LN 6.1 - DB: Oracle, SQL Server - OS: Unix, Windows
You can add a function in the custom report code (via Report Properties) yourself like
Code:
Function tt_getTextInLanguage(field as Field, lang as String) as String
return Infor.ReportingServices.Utilities.LNUtils.getTextFieldValue(field.Value, _ 
                  lang, field("company"), Report.Parameters!ConnectionString.Value)
End Function
And your expression should be something like
Code:
=Code.tt_getTextInLanguage(Fields!your_text_field, "2")
Note: this has not been tested...
Reply With Quote
Sponsored Links
  #3  
Old 27th March 2017, 09:49
BaBernd BaBernd is offline
Senior Member
 
Join Date: Mar 2015
Posts: 135
BaBernd is on a distinguished road
Baan: Infor 10.2.1 - DB: SQL-Server 2012 - OS: Windows Server 2008
Hello JaapJD,

that's great!!! It's exactly what I've looked for!!!

Quote:
Note: this has not been tested...
Now it's tested!!! Works best!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Question mr_suleyman Tools Development 37 11th November 2016 09:14
text fields in Infor reporting vs. SSRS / BIDS BaBernd Tools Development 7 21st October 2015 15:58
Technical question adding TEXT field Cancoon2000 Tools Development 5 30th June 2015 21:26
Print text field with RTF formatting (editor = WORD) en@frrom Tools Development 2 16th June 2008 09:26


All times are GMT +2. The time now is 13:45.


©2001-2017 - Baanboard.com - Baanforums.com