I have reports running where I have to combine a first and last name after converting case, and LCWORD seems completely determined to not allow me to remove trailing blanks from the first name. The basic code:
Looks very pretty in html, as html removes the extra spaces as a courtesy (or curse depending on your needs). In pdf the blanks on the end of the first name magically return.
I've twisted this about two-dozen ways, via ARGLEN and SUBSTR and the like, breaking it into pieces, but to no avail. If someone has made LCWORD and Strong Concatenation work together I would very much appreciate a reply.
Please -- I am not a rookie, and I have worked this. Reply if you have proven, in-production code only.
Remarkable that this bug has not been reported and fixed after 25 years of FOCUS.
July 26, 2007, 10:49 AM
Tony A
John,
We are aware that you are not a rookie, but it would be nice to know what platform and release you are using so that we can check on the same before we reply . Please update your signature?
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
July 26, 2007, 10:52 AM
John_Edwards
7.6 on Wintel. I will update my profile now, although each of my customers is using something different (sigh).
John, I usually do the LCWORD after the concatentations on the whold field and it seems to work fine. Of course on names it can be tricky if they are MacGuyver for example do you allow for that?
Leah
July 26, 2007, 12:29 PM
Glenda
Good thought Leah. That really does make one have to step back and rethink out the solution.
I really do love the FOCAL POINT "Think Tank".
Glenda
In FOCUS Since 1990 Production 8.2 Windows
July 26, 2007, 12:34 PM
John_Edwards
I've instructed the customer to fire all Scotsmen.This message has been edited. Last edited by: John_Edwards,
July 26, 2007, 12:48 PM
Tony A
It's not only the Scots that have apostrophes in their surnames
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
July 26, 2007, 09:10 PM
Piipster
Remember that strong concatenation (||) doesn't remove the blanks. It just moves them. The brackets make a single unit out of the last two elements so that the blanks at the end of the first name can be moved after them.
If you don't put the brackets in it will move them after the space you are inserting between the first and last names. It's not failing. It's doing exactly what you asked it to.
ttfn, kp
Access to most releases from R52x, on multiple platforms.
July 27, 2007, 08:23 AM
John_Edwards
"Remember that strong concatenation (||) doesn't remove the blanks. It just moves them."
It is my greatest hope and that you just made this up to be humorous.
July 29, 2007, 09:13 PM
Piipster
I was an Information Builders Instructor in FOCUS and WebFOCUS for many years. The biggest misconception about strong concatenation is that it strips out blanks. Consider the following:
A || B If A has trailing blanks they are moved to the end of B.
A || B | C The expression is evaluated from left to right. If A has trailing blanks they are still moved to after B, the object on the right side of the strong concatenation symbol.
A || (B | C) The object 'B | C' is evaluated first because of the brackets. It is now the object that is on the right side of the strong concatenation symbol so the trailing blanks from A are moved all the way to the end.
It was much more evident in the fixed fonts of the mainframe than it is with html output. Test it out with a COURIER font in PDF and it will become more clear.
ttfn, kp
Access to most releases from R52x, on multiple platforms.
July 30, 2007, 08:56 AM
jgelona
John_Edwards, sorry but Piipster is exactly correct.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
July 30, 2007, 09:24 AM
John_Edwards
This may be because the 102 course uses the language "remove the trailing blanks" in several locations.
But in the help files in Dev Studio it does indeed say that they are moved to the end of the string. See? You learn something new every day.