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.
DEFINE FILE CAR
DUMMY/A15='RECORDS';
END
TABLE FILE CAR
SUM
CAR.BODY.SALES OVER
CAR.BODY.SEATS OVER
CAR.BODY.DEALER_COST
BY DUMMY AS ''
ACROSS CAR.ORIGIN.COUNTRY AS ''
ON TABLE SET ASNAMES ON
-*ON TABLE HOLD
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=REPORT,
GRID=OFF,
$
ENDSTYLE
END
-RUN
But the dummy column needs to be vertically aligned, as the following output:
|--------------------------------------------------------------------------|
| ENGLAND FRANCE ITALY JAPAN W GERMANY |
|--------------------------------------------------------------------------|
| |SALES 12000 0 30200 78030 88190 |
|RECORDS |SEATS 13 5 10 8 34 |
| |DEALER_COST 37,853 4,631 41,235 5,512 54,563 |
|--------------------------------------------------------------------------|
Is there some way to do this (with PDF and Excel also)?
Thanks in advanceThis message has been edited. Last edited by: FP Mod Chuck,
Well, you can in HTML output by manipulating the tabular output that will be produced. It can get a little messy and you will generally be left with artefacts that you do not like, but FWIW .....
SET ACROSSLINE = OFF
DEFINE FILE CAR
DUMMY/A1='';
D_COUNTRY/A30 = IF COUNTRY EQ 'ENGLAND' THEN '</td><td>'||COUNTRY ELSE COUNTRY;
END
TABLE FILE CAR
SUM
COMPUTE CNTR/I9 = LAST CNTR + 1; NOPRINT
COMPUTE RECORDS/A100 = IF CNTR EQ 1 THEN '</td><td rowspan=3 style="vertical-align:middle;text-align:center;">Records' ELSE ''; AS '</td><td>'
BY DUMMY NOPRINT
SUM
SALES OVER
SEATS OVER
DEALER_COST
BY DUMMY NOPRINT
ACROSS D_COUNTRY AS ''
ON TABLE SET PAGE NOLEAD
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
type=report, grid=off, $
ENDSTYLE
END
-RUN
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, 2004
Not sure if this will help in your situation, but it works for the CAR file example. (HTML, PDF OR XLSX)
Here's the code ...
-*
-** HOLD SALES DATA
-*
DEFINE FILE CAR
SRT/A1 = '1';
END
-*
TABLE FILE CAR
SUM COMPUTE VAL/A12 = FPRINT(SALES,'I6','A12');
BY SRT
BY COUNTRY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HLD_SAL
END
? HOLD HLD_SAL
-*
-** HOLD SEATS DATA
-*
DEFINE FILE CAR
SRT/A1 = '2';
END
-*
TABLE FILE CAR
SUM COMPUTE VAL/A12 = FPRINT(SEATS,'I3','A12');
BY SRT
BY COUNTRY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HLD_SEA
END
? HOLD HLD_SEA
-*
-** HOLD DEALER_COST DATA
-*
DEFINE FILE CAR
SRT/A1 = '3';
END
-*
TABLE FILE CAR
SUM COMPUTE VAL/A12 = FPRINT(DEALER_COST,'D7','A12');
BY SRT
BY COUNTRY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HLD_DEA
END
? HOLD HLD_DEA
-*
-** COMBINE ALL THREE HOLD FILES INTO ONE
-*
TABLE FILE HLD_SAL
PRINT SRT COUNTRY VAL
ON TABLE HOLD AS HLD_ALL
MORE
FILE HLD_SEA
MORE
FILE HLD_DEA
END
? HOLD HLD_ALL
-*
-** CREATE REPORT
-*
DEFINE FILE HLD_ALL
TMP01/A15 = DECODE SRT(
'1' ' ',
'2' 'RECORDS',
'3' ' ',
ELSE ' ');
TMP02/A15 = DECODE SRT(
'1' 'SALES',
'2' 'SEATS',
'3' 'DEALER_COST',
ELSE ' ');
END
-*
TABLE FILE HLD_ALL
SUM VAL
ACROSS COUNTRY AS ''
BY SRT NOPRINT
BY TMP01 AS ''
BY TMP02 AS ''
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
TYPE=ACROSSVALUE, ACROSS=1, JUSTIFY=RIGHT, $
TYPE=DATA, COLUMN=N4, JUSTIFY=RIGHT, $
TYPE=DATA, COLUMN=N5, JUSTIFY=RIGHT, $
TYPE=DATA, COLUMN=N6, JUSTIFY=RIGHT, $
TYPE=DATA, COLUMN=N7, JUSTIFY=RIGHT, $
TYPE=DATA, COLUMN=N8, JUSTIFY=RIGHT, $
ENDSTYLE
END
-RUN
WebFocus 8.201M, Windows, App Studio
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008