I'm working on a report which has a relatively simple concatenation define. I want to create a field that is Lastname, Firstname. My problem is that when the PDF is viewed, the space is screwy. Here are a couple of things I tried...
IF KNOWN_AS NE ' ' THEN LASTNAME || ', ' || KNOWN_AS ELSE LASTNAME || ', ' || FIRSTNAME
This removes the space altogether, so my result is Lastname,Firstname
IF KNOWN_AS NE ' ' THEN LASTNAME | ', ' | KNOWN_AS ELSE LASTNAME | ', ' | FIRSTNAME
This gives me between 5 and 10 spaces between the Lastname and the ",". The spacing is not consistent, though....giving me something like: Lastname_____,Firstname Lastname__,Firstname Lastname________,Firstname
I also tried adjusting SQUEEZE, but it only produced the same two results.
I tried creating the define in the master file instead of the report, but it didn't help either.
Just FYI, I'm using Dev Studio 523.
Any help would be much appreciated! LisaThis message has been edited. Last edited by: <Kathryn Henning>,
March 24, 2005, 08:09 PM
reFOCUSing
Are you trying to create Lastname,_Firstname? If so you can do it as follows: LASTNAME || ', ' | FIRSTNAME
March 24, 2005, 08:19 PM
<Joseph Coule>
Yeah... what he said. It's a mix of hard concat (||) to remove trailing spaces and soft concat (|) to retain the single space after the comma.
The results of soft concatenation can look different between html and anything else (e.g. PDF or Excel), because html will automatically condense extra spaces, but PDF will not.
Does that help?
JC
(p.s. edited to fix typo)
March 24, 2005, 08:24 PM
reFOCUSing
The solution I gave will only work if FIRSTNAME has no leading blanks.
Thanks for all the input. Unfortunately, I've tried the combo of || and |, as well as the (), but I get no spaces between the , and the first name (my result is: Mych,Lisa). There are no spaces leading the first name or known as fields, it looks as though the extra spaces are coming from the end of the last_name field.
March 28, 2005, 04:46 PM
<Lisa M>
OK, I re-tried using the () and it worked this time. Thanks so much for all the help!
June 11, 2014, 03:50 AM
Nadanasababathy
How to define the spacesin PDF only
Web focus 7.6.11 All outputs
June 20, 2014, 06:59 PM
<Kathryn Henning>
Hi Nadanasababathy,
Using the techniques in this topic, what are the results that you're seeing? Are you not getting any spaces between fields in PDF, or are you getting too many spaces or spaces not in the desired location?
Thanks and regards,
Kathryn
June 21, 2014, 02:29 PM
Ramkumar - Webfous
quote:
How to define the spacesin PDF only
If you have an &variable for Dynamic Output Format, then use that in the IF clause while defining this field..