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.
I'm working on a report with mailing addresses. Some of the rows in the database are longer than others and I want to know how to control the spacing between each entry in the report.
In the report I want to format like this: Address Line 1 Address Line 2 (if not null) City, State Zip Country (only if not US) -- blank line -- [next entry]
My table file is this: TABLE FILE FINAL PRINT SUP_NUM AS '' AGENCY_NAME AS '' IN 7 ADDRESS_LINE1 AS '' IN 30 OVER ADDRESS_LINE2 AS '' IN 30 OVER LOCATION AS '' IN 30 OVER COUNTRY_LOC AS '' IN 30 BY SMO_NUMBER NOPRINT
However, for rows without a address line 2 or that are in the US, I get something like Addy Ln 1 . City, State Zip -- blank line -- -- blank line -- [next]
To bump city and state up, I added a define entry to see if addy line 2 is null, and if so replace with city state and zip. But then that gives me three blank lines at the end of the address and I only want one. How can I get around this? Using PDF formatThis message has been edited. Last edited by: BDAVIS,
I don't think you're going to find a way around that one without some trickery. If all of the fields COULD have data, you've got to show them all. Bubble sorting (more or less what you've done) moves all the non-blank lines to the top and blanks to the bottom, but they still show up. The only way I can think of is to create a hold file appending all of the address lines together and then creating an alternate multi-segment master file using an OCCURS=. In essence, this would allow you to only show as many lines as necessary to display non-blank values. I've seen the technique described on other posts - maybe search on OCCURS.This message has been edited. Last edited by: Darin Lee,
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
One quick method is to change the font size to 1 for lines that are blank:
TABLE FILE CAR
PRINT
COMPUTE SALES_IND/D1 = IF SALES EQ 0 OR SALES IS MISSING THEN 0 ELSE 1; NOPRINT
COUNTRY AS '' OVER
CAR AS '' OVER
MODEL AS '' OVER
SALES/D5S AS '' OVER
BODYTYPE AS ''
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY MODEL NOPRINT
ON MODEL SUBFOOT
" "
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT, FONT=ARIAL, SIZE=8, $
TYPE=REPORT, COLUMN=P4, SIZE=1, WHEN= SALES_IND EQ 0, $
ENDSTYLE
END
There still is a gap, but it's very small, almost undetectable.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
-SET &&INCLUDE = '-INCLUDE';
-*
&&INCLUDE.EVAL GRPPFILE
-*
JOIN
EENMBR IN ELGEMP TO ALL ERNMBR IN ELGADR AS J1
END
-*
DEFINE FILE ELGEMP
GROUP/A55 = EEGPNO||('-'|EELOCA);
NAME/A55 = TRIM('B',(EEFNAM||(' '|EELNAM)),61,' ', 1, 'A55');
CITY_LINE/A55 = ERCITY||(', '|ERSTAT)||(' '|EDIT(ERZPCD, '99999'));
ADDR1/A55 = IF ERADR1 EQ '' OR ' ' THEN ERADR2 ELSE ERADR1;
ADDR2/A55 = IF ERADR1 EQ '' OR ' ' THEN CITY_LINE ELSE
IF ERADR2 EQ '' OR ' ' THEN CITY_LINE ELSE ERADR2;
ADDR3/A55 = IF ERADR1 EQ '' OR ' ' THEN '' ELSE
IF ERADR2 EQ '' OR ' ' THEN '' ELSE CITY_LINE;
ADDR4/A55 = '';
SPLINE/A55 = '';
END
-*
TABLE FILE ELGEMP
PRINT
NAME
ADDR1
ADDR2
ADDR3
ADDR4
SPLINE
BY EENMBR
BY GROUP
WHERE ERDPCD EQ 'e'
WHERE ERTODT EQ '99999999'
WHERE EEGPNO EQ '00136'
ON TABLE HOLD AS WORKDATA
END
-*
DEFINE FILE WORKDATA
LINEDATA/A55 = NAME;
LINENO/I9 = 2;
END
-*
TABLE FILE WORKDATA
PRINT LINEDATA
LINENO
BY EENMBR
BY GROUP
ON TABLE HOLD AS NAMDATA
END
-*
DEFINE FILE WORKDATA
LINEDATA/A55 = ADDR1;
LINENO/I9 = 3;
END
-*
TABLE FILE WORKDATA
PRINT LINEDATA
LINENO
BY EENMBR
BY GROUP
WHERE ADDR1 NE ''
ON TABLE HOLD AS A1DATA
END
-*
DEFINE FILE WORKDATA
LINEDATA/A55 = ADDR2;
LINENO/I9 = 4;
END
-*
TABLE FILE WORKDATA
PRINT LINEDATA
LINENO
BY EENMBR
BY GROUP
WHERE ADDR2 NE ''
ON TABLE HOLD AS A2DATA
END
-*
DEFINE FILE WORKDATA
LINEDATA/A55 = ADDR3;
LINENO/I9 = 5;
END
-*
TABLE FILE WORKDATA
PRINT LINEDATA
LINENO
BY EENMBR
BY GROUP
WHERE ADDR3 NE ''
ON TABLE HOLD AS A3DATA
END
-*
DEFINE FILE WORKDATA
LINEDATA/A55 = ADDR4;
LINENO/I9 = 6;
END
-*
TABLE FILE WORKDATA
PRINT LINEDATA
LINENO
BY EENMBR
BY GROUP
WHERE ADDR4 NE ''
ON TABLE HOLD AS A4DATA
END
-*
DEFINE FILE WORKDATA
LINEDATA/A55 = SPLINE;
LINENO/I9 = 7;
END
-*
TABLE FILE WORKDATA
PRINT LINEDATA
LINENO
BY EENMBR
BY GROUP
ON TABLE HOLD AS SPLINE
END
-*
TABLE FILE NAMDATA
PRINT LINEDATA
BY EENMBR
BY GROUP
BY LINENO
ON TABLE HOLD AS FDATA
MORE
FILE A1DATA
MORE
FILE A2DATA
MORE
FILE A3DATA
MORE
FILE A4DATA
MORE
FILE SPLINE
END
-*
DEFINE FILE FDATA
SPLINE/A55 = '';
END
-*
TABLE FILE FDATA
PRINT
LINEDATA AS ''
BY EENMBR AS ''
BY GROUP AS ''
BY LINENO NOPRINT
END
-*
-EXIT