#53176 - 03/14/16 03:17 PM
Printing part of the data in Bold font
|
OL Expert
Registered: 02/13/13
Posts: 320
Loc: Ontario
|
Hi, I'm facing a very challenging situation here and your help is greatly appreciated. I need to print part of the data in Bold font. I have a CSV data file which has business messages like add1, add2,add3,add4,BusMessage1,BusMessage2,BusMessage3 Data sample: BusMessage1 If you wish to spend with us on either March 18th or March 19th for this two-day only event then take the first step to huge savings by visiting your personal page now: http://helpme.com/TechSupportNow I would like to change the date March 18th in Bold font, and March 19th in Bold font, and http://helpme.com/TechSupport in Bold font. I can get my client to insert markers or some unique character maybe like (#Bd) from the start of the word till end of the word to show the Bold area. For example the data can be change like below if this helps. If you wish to spend with us on either #Bd March 18th #Bd or #Bd March 19th #Bd for this two-day only event then take the first step to huge savings by visiting your personal page now: #Bd http://helpme.com/TechSupport #Bd Can someone help me how to do this in Design. Thank you in advance.
|
Top
|
|
|
|
#53209 - 03/17/16 04:31 PM
Re: Printing part of the data in Bold font
[Re: Walli]
|
OL Expert
Registered: 02/13/13
Posts: 320
Loc: Ontario
|
OK so far I worked out how to make the words between the stars to print in bold.
My next challenge is to wrap the text correctly, with the below script it's printing the entire data selection in one straight line.
below is PreesTalk script to porint the words between the (*) in bold.
define(&i,integer,0) define(&j,integer,0) define(&k,integer,0) define(&s,string,'') define(&l,integer,0) define(&temp,string,'')
&s:=trim(@(7,1,205)) search(&s,'*') &k:=&k+1 endsearch()
&s:=trim(@(7,1,205)) &l:=length(&s) &i:=pos('*',&s) for(&j,1,1,&k) &temp:=left(&s,&i-1) show(left(&s,&i-1)) &s:=right(&s,&l-&i) &i:=pos('*',&s) setstyle(&style2) %% bold %% &temp:=left(&s,&i-1) show(left(&s,&i-1)) &l:=length(&s) &s:=right(&s,&l-&i) &l:=length(&s)
%&s:=right(&s,&l-&i) &i:=pos('*',&s) setstyle(&style1) %%unbold%% %show(&S)
endfor()
Can anyone edit this code to wrap the text correctly please.
I would love to know how can this be done.
Cheers
Edited by Walli (03/17/16 04:36 PM)
|
Top
|
|
|
|
#53217 - 03/18/16 12:21 PM
Re: Printing part of the data in Bold font
[Re: Walli]
|
OL Expert
Registered: 02/13/13
Posts: 320
Loc: Ontario
|
I realy need this, I think somehow word wrap needs to be forced
|
Top
|
|
|
|
#53218 - 03/18/16 12:26 PM
Re: Printing part of the data in Bold font
[Re: Walli]
|
OL Expert
Registered: 02/13/13
Posts: 320
Loc: Ontario
|
I tried below code which works nicely to wrap the text but I couldn't get it working for me to make the words Bold and wrap the variable text. If you can please let me know how.
Happy Friday
define(&i, integer, 0) define(&s, string, '') define(&curstr, string, '')
&s := stringreplace(stringreplace(@(7,1,250), '\015', ''), '\012', '|')
for(&i, 1, 1, length(&s)) if(mid(&s, &i, 1) = ' ') if(stringwidth(&curstr) > &Width) show(&curstr) crlf(0.1667) &curstr := '' elseif() &curstr := &curstr + ' ' endif() elseif() if(mid(&s, &i, 1) = '|') show(&curstr) crlf(0.1667) &curstr := '' elseif() &curstr := &curstr + mid(&s, &i, 1) endif() endif() endfor()
show(&curstr)
|
Top
|
|
|
|
#53221 - 03/18/16 04:17 PM
Re: Printing part of the data in Bold font
[Re: Walli]
|
OL Expert
Registered: 02/13/13
Posts: 320
Loc: Ontario
|
|
Top
|
|
|
|
#53222 - 03/18/16 04:20 PM
Re: Printing part of the data in Bold font
[Re: Walli]
|
Jeff_K
Unregistered
|
Wali, Sorry - wrong product.
Edited by Jeff_K (03/18/16 04:23 PM)
|
Top
|
|
|
|
#53224 - 03/18/16 05:40 PM
Re: Printing part of the data in Bold font
[Re: Walli]
|
OL User
Registered: 09/12/14
Posts: 77
|
Hi Walli,
The 2 dates and the URL you want bold are variables in your field 'BusMessage1' ? If true, could you give other pertinents data-samples for this field, I will take a look.
|
Top
|
|
|
|
#53228 - 03/21/16 09:16 AM
Re: Printing part of the data in Bold font
[Re: Walli]
|
OL Expert
Registered: 02/13/13
Posts: 320
Loc: Ontario
|
Hi Kaiser, The dates and the URL are not variables but at the start and end of each word there's a start (*) added, for example. *date* and the ext word might be *URL*. My first PressTalk script searches for '*' and makes the word bold which works fine, the second PressTalk script should wraps the data selection but the entire data selection prints on one straight line. I just need to some how force the word wrap. Your help and trying is appreciated.
|
Top
|
|
|
|
#53229 - 03/21/16 10:29 AM
Re: Printing part of the data in Bold font
[Re: Walli]
|
OL User
Registered: 09/12/14
Posts: 77
|
Hi Walli,
You could split 'BusMessage1' into 6 global-variables and print them on a textbox, in the desired style
|
Top
|
|
|
|
|
|