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     [SOLVED] Blank space

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Blank space
 Login/Join
 
Platinum Member
posted
I have a formatting question , I have a series of address fields, Address line 1, address Line 2, address line 3 , city , state and zip. I can concatenate a compute field to properly format the city state and zip as CITY ST, ZZZIP (no problem on this line) but, the way the end user needs the address formatted is so that the fields 1,2 and 3 roll up so that no white space is created. I am trying to this in a PDF header so that I can deliver a nicely formatted report Report regarding Donors at a State University. Sometimes there is a line 2 or 3 , sometimes not but when there is not I would like to eliminate the empty row,

I feel like someone has surely done this before to create labels or letters

Thanks

This message has been edited. Last edited by: Geoff Fish,


809 DevStudio, MRE, Report Caster , Report Library
Output: Excel PDF, HTML
 
Posts: 171 | Registered: April 28, 2008Report This Post
Virtuoso
posted Hide Post
Instead of printing address line 2 and 3, define a new line that checks if line 2 and 3 are blank. If they are promote city, state zip up. Something like this:
NEW_ADD_2/A30=IF ADDRESS_LINE2 EQ MISSING THEN ADDRESS_LINE3 ELSE ADDRESS_LINE2;
NEW_ADD_3/A30=IF ADDRESS_LINE3 EQ MISSING THEN CITY_STATE_ZIP ELSE ADDRESS_LINE3;


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
Here's a technique I've been using for a long time ...

You should be able to run this code. It creates two reports. First report just prints the original address lines and the second report prints the new label lines.

-*
FILEDEF DATA DISK adr_file.txt
-RUN
-WRITE DATA Information Builders, Inc| | |Two Penn Plaza|New York, NY 10121-2898
-WRITE DATA Information Builders, Inc|Attn: WebFocus | |Two Penn Plaza|New York, NY 10121-2898
-WRITE DATA ReportCaster|Information Builders, Inc|Marketing Department|Two Penn Plaza|New York, NY 10121-2898
-WRITE DATA Information Builders, Inc| |Two Penn Plaza| |New York, NY 10121-2898
-WRITE DATA InfoAssist| |Two Penn Plaza|New York, NY 10121-2898|
-WRITE DATA Information Builders, Inc| |AppStudio|Two Penn Plaza|New York, NY 10121-2898
-WRITE DATA IBI|Two Penn Plaza|New York, NY 10121-2898| |
-WRITE DATA JavaScript|CSS|Two Penn Plaza| |New York, NY 10121-2898
-WRITE DATA Information Builders, Inc| |Attn: HTML |Two Penn Plaza|New York, NY 10121-2898
-WRITE DATA | |FocalPoint|Two Penn Plaza|New York, NY 10121-2898
-CLOSE
-RUN
-*
FILEDEF MASTER DISK adr_file.mas
-RUN
-WRITE MASTER FILENAME=ADR_FILE, SUFFIX=DFIX,$
-WRITE MASTER SEGMENT=ADR_FILE, SEGTYPE=S0,$
-WRITE MASTER FIELDNAME=ADR_L1,,A32,A32,$
-WRITE MASTER FIELDNAME=ADR_L2,,A32,A32,$
-WRITE MASTER FIELDNAME=ADR_L3,,A32,A32,$
-WRITE MASTER FIELDNAME=ADR_L4,,A32,A32,$
-WRITE MASTER FIELDNAME=ADR_L5,,A32,A32,$
-WRITE MASTER FIELDNAME=DELIMITER, ALIAS='|',A01,A01,$
-CLOSE
-RUN
-*
FILEDEF ADR_FILE DISK adr_file.txt
-RUN
-*
DEFINE FILE ADR_FILE
CNTR/I7SC = CNTR + 1;
-*
P_L1/A32 = ADR_L1;
P_L2/A32 = ADR_L2;
P_L3/A32 = ADR_L3;
P_L4/A32 = ADR_L4;
P_L5/A32 = ADR_L5;
-*
P_XL1/A33 = IF P_L1 EQ ' ' THEN ' ' ELSE P_L1 | 'X';
P_XL2/A33 = IF P_L2 EQ ' ' THEN ' ' ELSE P_L2 | 'X';
P_XL3/A33 = IF P_L3 EQ ' ' THEN ' ' ELSE P_L3 | 'X';
P_XL4/A33 = IF P_L4 EQ ' ' THEN ' ' ELSE P_L4 | 'X';
P_XL5/A33 = IF P_L5 EQ ' ' THEN ' ' ELSE P_L5 | 'X';
-*
P_ONELINE/A165 = P_XL1 || P_XL2 || P_XL3 || P_XL4 || P_XL5;
-*
LBL_L1/A32 = SUBSTR(132,P_ONELINE,1,33,32,LBL_L1);
LBL_L2/A32 = SUBSTR(132,P_ONELINE,34,66,32,LBL_L2);
LBL_L3/A32 = SUBSTR(132,P_ONELINE,67,99,32,LBL_L3);
LBL_L4/A32 = SUBSTR(132,P_ONELINE,100,132,32,LBL_L4);
LBL_L5/A32 = SUBSTR(198,P_ONELINE,133,165,32,LBL_L5);
END
-*
TABLE FILE ADR_FILE
PRINT ADR_L1 ADR_L2 ADR_L3 ADR_L4 ADR_L5
BY CNTR
END
-*
TABLE FILE ADR_FILE
PRINT LBL_L1 LBL_L2 LBL_L3 LBL_L4 LBL_L5
BY CNTR
END
-EXIT


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Virtuoso
posted Hide Post
I don't know if this can help, but at least it can gives you a starting point to work with. Can also work using SUBHEAD, FOOTING, ...
Just need to have as many conditional HEADING as needed.
TABLE FILE PERSINFO
BY PIN NOPRINT
ON PIN PAGE-BREAK

HEADING
"Pin    : <PIN"
"Street : <STREETNO"
"Apt    : <APT"
"City   : <CITY"
"State  : <STATE"
WHEN APT GT '';

HEADING
"Pin    : <PIN"
"Street : <STREETNO"
"City   : <CITY"
"State  : <STATE"
WHEN APT EQ '';

ON TABLE PCHOLD FORMAT PDF
END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Gold member
posted Hide Post
Try this......
 
DEFINE FILE SYSCOLUM
LIN1/A50 = 'ADDRESS LINE 1';
LIN2/A50 = '';
LIN3/A50 = 'LINE 3'
END
TABLE FILE SYSCOLUM
SUM
COMPUTE EEE/A200 = IF LIN1 EQ '' THEN LIN2 | LIN3 ELSE 
				   IF LIN2 EQ '' THEN LIN1 | LIN3 ELSE 
				   IF LIN1 EQ '' AND LIN2 EQ '' THEN LIN3 ELSE
				   IF LIN1 NE '' AND LIN2 NE '' AND LIN3 NE '' THEN LIN1 | LIN2 | LIN3;
				 
BY  TBNAME
WHERE RECORDLIMIT EQ 1
END
 


8202, 8105M, 7.7.03
 
Posts: 79 | Registered: June 12, 2012Report This Post
Virtuoso
posted Hide Post
quote:

COMPUTE EEE/A200 = IF LIN1 EQ '' THEN LIN2 | LIN3 ELSE
IF LIN2 EQ '' THEN LIN1 | LIN3 ELSE
IF LIN1 EQ '' AND LIN2 EQ '' THEN LIN3 ELSE
IF LIN1 NE '' AND LIN2 NE '' AND LIN3 NE '' THEN LIN1 | LIN2 | LIN3;


Dev,

No need to do all this IF ... THEN ... ELSE.
If you would like to have all three lines together without spaces (which I think Geoff is not requesting) you just need to use the double pipe.
In below, I kept a space between value and then remove it if no data beside it (--> and <-- are there only to show that starting and ending of the string) :
COMPUTE EEE/A210 = '-->' | TRIMV('B', LIN1 || ' ' | LIN2 || ' ' | LIN3, 200, ' ', 1, 'A200') | '<--';


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
I don't know if it is available on IBI's website or not but it should be. Try to find the FOCUS Systems Journal Encyclopedia Vol 6 Number 2 from 1994. I can't believe I've kept this for over 23 years. Most of this publication was written by Noreen Redden and Art Greenhaus (the original Foc Wizards). It extensively covers the MacGyver Technique (14 articles). I think what is being asked for is covered in the article beginning on page 10.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Expert
posted Hide Post
Smiler
quote:
Noreen Redden and Art Greenhaus (the original Foc Wizards)
Those manuals are worth their weight in gold... The info still holds true...




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
Never really understood the Art Greenhas method suggested but did come up with a solution that works.



Any criticisms or suggestions gladly taken into account.

TABLE FILE SQLOUT
PRINT
COMPUTE CITSTATEZIP/A300 = AWVHHLD_CITY || ( ' ' | AWVHHLD_STAT_CODE ) || ( ', ' | AWVHHLD_ZIP ); NOPRINT
COMPUTE BUSCITYZIP/A300 = BUSINESS_CITY || ( ' ' | BUSINESS_STAT_CODE ) || ( ', ' | BUSINESS_ZIP ); NOPRINT
COMPUTE PREF_CLASS/A16 = IF AWVHHLD_PREF_CLAS NE '9999' THEN AWVHHLD_PREF_CLAS ELSE ''; NOPRINT
COMPUTE CONF/A12 = IF AWVHHLD_CONFID_IND EQ 'Y' THEN 'Confidential' ELSE ' '; NOPRINT
HEADING
""""""
WHEN BUSINESS_STREET_LINE2 NE ' ' AND BUSINESS_STREET_LINE3 NE ' ';

HEADING
"""""
WHEN BUSINESS_STREET_LINE1 NE ' ' AND BUSINESS_STREET_LINE2 NE ' ' AND BUSINESS_STREET_LINE3 EQ ' ' ;

HEADING
""""
WHEN BUSINESS_STREET_LINE1 NE ' ' AND BUSINESS_STREET_LINE2 EQ ' ' AND BUSINESS_STREET_LINE3 EQ ' ' ;

HEADING
"""WHEN BUSINESS_STREET_LINE1 EQ ' ' AND BUSINESS_STREET_LINE2 EQ ' ' AND BUSINESS_STREET_LINE3 EQ ' ' AND BUSINESS_CITY NE ' ' ;


HEADING
""WHEN BUSINESS_STREET_LINE1 EQ ' ' AND BUSINESS_STREET_LINE2 EQ ' ' AND BUSINESS_STREET_LINE3 EQ ' ' ;

ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
END


809 DevStudio, MRE, Report Caster , Report Library
Output: Excel PDF, HTML
 
Posts: 171 | Registered: April 28, 2008Report This Post
Expert
posted Hide Post
quote:
Try to find the FOCUS Systems Journal Encyclopedia Vol 6 Number 2 from 1994

There are some available, but not as early as 1994 Frowner The earliest is 1996.

You need to login to this link to see them.


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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     [SOLVED] Blank space

Copyright © 1996-2020 Information Builders