Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Spaces in DEFINE - PDF only

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Spaces in DEFINE - PDF only
 Login/Join
 
<Lisa M>
posted
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!
Lisa

This message has been edited. Last edited by: <Kathryn Henning>,
 
Report This Post
Guru
posted Hide Post
Are you trying to create Lastname,_Firstname?
If so you can do it as follows:
LASTNAME || ', ' | FIRSTNAME
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
<Joseph Coule>
posted
Yeah... what he said. Smiler 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)
 
Report This Post
Guru
posted Hide Post
The solution I gave will only work if FIRSTNAME has no leading blanks.
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Master
posted Hide Post
try this,

DEFINE FILE TABNAME
LNAME/A32V=TRIMV('B',LAST_NAME,32,' ',1,LNAME);
FNAME/A32V=TRIMV('B',FIRST_NAME,32,' ',1,FNAME);
NAME/A40=LNAME | ', ' | FNAME;
END
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Guru
posted Hide Post
You may still get some inconsistent spacing with

LASTNAME || ', ' | FIRSTNAME


Make sure you use ( ) around the last part.

LASTNAME || (', ' | FIRSTNAME )
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
<Lisa M>
posted
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.
 
Report This Post
<Lisa M>
posted
OK, I re-tried using the () and it worked this time. Thanks so much for all the help! Smiler
 
Report This Post
Member
posted Hide Post
How to define the spacesin PDF only


Web focus 7.6.11
All outputs
 
Posts: 3 | Registered: February 28, 2012Report This Post
<Kathryn Henning>
posted
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
 
Report This Post
Guru
posted Hide Post
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..

 NAME/A40=IF &OPFORMAT EQ 'PDF' THEN LNAME | ', ' | FNAME ELSE 'NOSPACE_LOGIC_PLEASE; 


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Spaces in DEFINE - PDF only

Copyright © 1996-2020 Information Builders