Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
15%
200 - 500 GB
27%
500 - 800 GB
4%
800 - 1200 GB
4%
1200 - 1500 GB
12%
1500 - 2000 GB
15%
> 2000 GB
23%
Total votes: 26

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 13th July 2018, 16:07
pralash pralash is offline
Senior Member
 
Join Date: Feb 2017
Posts: 225
pralash is on a distinguished road
Baan: 9.0 - DB: SQL Server - OS: Windows 2012R2
How to get the multiple text lines from the text manager tttxt010 table
Baan: Other/Unknown
C/S: None/Unknown

Hi,
I'm doing a customization in order to fetch the text from the table tttxt010 by checking the text number from the sales order table as follows...

select tttxt010.ctxt, tttxt010.text
from tttxt010
where tttxt010.ctxt = {:tdsls400.txta}
selectdo
text.header = tttxt010.text
message("%s",tttxt010.text)
endselect
Actually I can view two lines of text for the particular text no via the Text manager tool in ERPLN... But I can get only one line of text while execute the above script... So how can I get all lines in that particular field.
Note : I have created report input field as follows for "text.header"
text.header tcmcsstr300m

Can anybody please help me...
Regards,
Pralash
Reply With Quote
Sponsored Links
  #2  
Old 13th July 2018, 16:37
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,725
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
Use text.to.buf()

Hello,

text.to.buf()

Code:
text.to.buf()
Syntax:

function long  text.to.buf  (string text_field, string lang, long nr_lines, ref string buf [, long rtf.text])

Description

This stores the text of a specified text field in a two-dimensional string array.

Arguments

string text_field The name of the text field that must be retrieved. See Text fields overview.
 
string lang This specifies the relevant language.
 
long nr_lines This specifies the maximum number of lines that can be stored in the buffer.
 
ref string buf This specifies the buffer in which the text must be stored.
 
[long rtf.text ] Set this argument to true if you want the text to be stored in RTF format instead of ASCII format. This is possible only when using a text group that supports RTF data.
 
Return values

>0        number of stored lines
  0        error
- 1        no permission to store the text

Context

This function can be used in all script types.
or use the textfield directly with domain tctxtn in your Report layout.

Regards
__________________
//Bernd

Last edited by bdittmar : 13th July 2018 at 16:41. Reason: tctxtn added
Reply With Quote
  #3  
Old 14th July 2018, 18:48
pralash pralash is offline
Senior Member
 
Join Date: Feb 2017
Posts: 225
pralash is on a distinguished road
Baan: 9.0 - DB: SQL Server - OS: Windows 2012R2
Hi,

Thanks so much for replied....
Whenever I created the report input field for "tttxt010.text", the domain "tttxt.buf" is automatically allocated.... Then as you suggested, I have used the filed name "tttxt010.text" in the report layout... but it highlight a error such "Field length cannot be grater than 116"... So how can I use the field name directly in the report layout in order to get the multiple lines from that field...

Regards,
Pralash
Reply With Quote
  #4  
Old 16th July 2018, 08:51
andreas.toepper andreas.toepper is offline
Senior Member
 
Join Date: Jun 2004
Posts: 147
andreas.toepper is on a distinguished road
Baan: Baan4, LN6.1 - DB: MSSQL - OS: Linux&Windows
Quote:
Originally Posted by pralash View Post
"Field length cannot be grater than 116
This means the field does not fit in the layout. Its selected or defaulted width will extend the layouts width (mind the maximum width of 255 chars).

You can simply correct the width of the field "Print Length" (needs to be less than 116+1).

This needs to be done before you save the field data of field tdsls400.txta is saved.

Oh, btw: if you want to print field tdsls400.txta in the report, you just need to insert the text field tdsls400.txta in the layout. There's no need to fetch data from the tools table tttxt010. LN will print the text data if a text field is inserted in the layout.
And don't be surprised: insert the text field, extend the value of field "Print Length" to the width you need. This will result in a field with the high of 1 row. On runtime LN will print as many text lines as presented in the text.
Reply With Quote
  #5  
Old 16th July 2018, 10:36
pralash pralash is offline
Senior Member
 
Join Date: Feb 2017
Posts: 225
pralash is on a distinguished road
Baan: 9.0 - DB: SQL Server - OS: Windows 2012R2
Hi Andreas,
Thanks so much for your guidance... I'll try as you suggested...
Regards,
Pralash
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
Invoices printing issue-display last record with 2 lines tracylee Tools Development 7 20th October 2017 11:51
Text Number from Text Manager mark_h Tools Development 10 17th January 2014 20:21
Display Text to multiple lines in report Grace Cheong Tools Development 2 8th July 2011 12:19
Text manager in form without main table bh_vfp Tools Development 2 18th November 2002 16:11


All times are GMT +2. The time now is 19:35.


©2001-2018 - Baanboard.com - Baanforums.com