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.
Hi All I have a report that can be run for one Location or Multiple Locations via Launch Page. Report data is laid out by Location. There is one row per location. Data row has different sections (LINE_DESC1..). All columns are laid out in a Subhead not in a PRINT.(See below) Works fine. But one of the section does not have any values, so it is setup to display ‘N/A’ value.. if the whole section has no values , does not make sense to display bunch of N/A’s . How to suppress printing of the whole section..?
This message has been edited. Last edited by: <Kathryn Henning>,
Prod/Dev/Test: WF 8.1.5 on (Windows Server 2012 R2 ) SandBox: WebFocus Server 8.1.5 on Windows Server 2008 R2 WebFOCUS App Studio 8.1.5 and Developer Studio 8.1.5 on Windows 7
Posts: 134 | Location: USA | Registered: August 21, 2008
APP PATH IBISAMP
DEFINE FILE CAR
C_C/A50=COUNTRY||CAR;
END
TABLE FILE CAR
SUM
SALES
DEALER_COST
RETAIL_COST
BY C_C NOPRINT
BY COUNTRY
BY CAR
ON C_C SUBHEAD
""
"<COUNTRY Sales <SALES"
"<CAR Sales <SALES"
""
WHEN SALES GT 0;
ON C_C SUBHEAD
""
""
WHEN SALES EQ 0;
END
Thanks Ram See the code below, now I have a issue with the label row (first line in SUBHEAD). I only want the Label row to have a background color.. to use the "WHEN" on each line, I have to specify each line, after I specify SUBHEAD for each line
It messes up the style sheet code which is based on the SUBHEAD line no..
APP PATH IBISAMP
DEFINE FILE CAR
COUNTRY1/A10=IF COUNTRY EQ 'ENGLAND' THEN 'ENGLAND' ELSE '';
COUNTRY2/A10=IF COUNTRY EQ 'FRANCE' THEN 'FRANCE' ELSE '';
COUNTRY3/A10=IF COUNTRY EQ 'ITALY' THEN 'ITALY' ELSE '';
COUNTRY4/A10=IF COUNTRY EQ 'JAPAN' THEN 'JAPAN' ELSE '';
COUNTRY5/A10=IF COUNTRY EQ 'W GERMANY' THEN 'W GERMANY' ELSE '';
-*
SALES1/D11.2 = IF COUNTRY EQ 'ENGLAND' THEN SALES ELSE 0;
SALES2/D11.2 = IF COUNTRY EQ 'FRANCE' THEN SALES ELSE 0;
SALES3/D11.2 = IF COUNTRY EQ 'ITALY' THEN SALES ELSE 0;
SALES4/D11.2 = IF COUNTRY EQ 'JAPAN' THEN SALES ELSE 0;
SALES5/D11.2 = IF COUNTRY EQ 'W GERMANY' THEN SALES ELSE 0;
-*
DCOST1/D11.2 = IF COUNTRY EQ 'ENGLAND' THEN DEALER_COST ELSE 0;
DCOST2/D11.2 = IF COUNTRY EQ 'FRANCE' THEN DEALER_COST ELSE 0;
DCOST3/D11.2 = IF COUNTRY EQ 'ITALY' THEN DEALER_COST ELSE 0;
DCOST4/D11.2 = IF COUNTRY EQ 'JAPAN' THEN DEALER_COST ELSE 0;
DCOST5/D11.2 = IF COUNTRY EQ 'W GERMANY' THEN DEALER_COST ELSE 0;
-*
LINE1/A10 WITH CAR =IF COUNTRY EQ 'ENGLAND' THEN 'COUNTRY1' ELSE '';
LINE2/A10 WITH CAR =IF COUNTRY EQ 'FRANCE' THEN 'COUNTRY2' ELSE '';
LINE3/A10 WITH CAR =IF COUNTRY EQ 'ITALY' THEN 'COUNTRY3' ELSE '';
LINE4/A10 WITH CAR =IF COUNTRY EQ 'JAPAN' THEN 'COUNTRY4' ELSE '';
LINE5/A10 WITH CAR =IF COUNTRY EQ 'W GERMANY' THEN 'COUNTRY5' ELSE '';
-*
DUMMY/A10=' ';
END
-RUN
TABLE FILE CAR
SUM
MAX.COUNTRY1
MAX.COUNTRY2
MAX.COUNTRY3
MAX.COUNTRY4
MAX.COUNTRY5
-*
MAX.SALES1
MAX.SALES2
MAX.SALES3
MAX.SALES4
MAX.SALES5
-*
MAX.DCOST1
MAX.DCOST2
MAX.DCOST3
MAX.DCOST4
MAX.DCOST5
-*
MAX.LINE1
MAX.LINE2
MAX.LINE3
MAX.LINE4
MAX.LINE5
-*
DUMMY
ON TABLE HOLD AS CAR2
END
-RUN
TABLE FILE CAR2
SUM
DUMMY AS '' NOPRINT
BY DUMMY NOPRINT
ON DUMMY SUBHEAD
"Line <+0>Country<+0>Sales<+0>Dealer Cost"
ON DUMMY SUBHEAD
"<LINE1<+0<COUNTRY1<+0><SALES1<+0><DCOST1"
WHEN SALES1 GT 0
ON DUMMY SUBHEAD
"<LINE2<+0><COUNTRY2<+0><SALES2<+0><DCOST2"
WHEN SALES2 GT 0
ON DUMMY SUBHEAD
"<LINE3<+0><COUNTRY3<+0><SALES3<+0><DCOST3"
WHEN SALES3 GT 0
ON DUMMY SUBHEAD
"<LINE4<+0><COUNTRY4<+0><SALES4<+0><DCOST4"
WHEN SALES4 GT 0
ON DUMMY SUBHEAD
"<LINE5<+0><COUNTRY5<+0><SALES5<+0><DCOST5"
WHEN SALES5 GT 0
ON TABLE SET PAGE-NUM OFF
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.100000,
RIGHTMARGIN=0.100000,
TOPMARGIN=0.100000,
BOTTOMMARGIN=0.100000,
SQUEEZE=ON,
GRID=ON,
ORIENTATION=LANDSCAPE,
WRAP=OFF,
$
TYPE=REPORT, FONT='ARIAL', SIZE=8, $
TYPE=SUBHEAD,BY=DUMMY,LINE=1,HEADALIGN=BODY,SIZE=8,COLOR=WHITE,BACKCOLOR='BLUE',SQUEEZE=ON,$
TYPE=SUBHEAD, HEADALIGN=BODY, $
ENDSTYLE
END
Prod/Dev/Test: WF 8.1.5 on (Windows Server 2012 R2 ) SandBox: WebFocus Server 8.1.5 on Windows Server 2008 R2 WebFOCUS App Studio 8.1.5 and Developer Studio 8.1.5 on Windows 7
Posts: 134 | Location: USA | Registered: August 21, 2008
Ok What I did was to create a DUMMY2 sort which has the same value as the original sort (DUMMY). Since the STYLESHEET is treating Line 1 for ON DUMMY SUBHEAD "Line 1" I tricked it to use DUMMY2 in the lines that are conditional and not to interfere with the original (Label) Line 1..
I am posting this in case someone else is having the same issue Thanks ALL
APP PATH IBISAMP
DEFINE FILE CAR
COUNTRY1/A10=IF COUNTRY EQ 'ENGLAND' THEN 'ENGLAND' ELSE '';
COUNTRY2/A10=IF COUNTRY EQ 'FRANCE' THEN 'FRANCE' ELSE '';
COUNTRY3/A10=IF COUNTRY EQ 'ITALY' THEN 'ITALY' ELSE '';
COUNTRY4/A10=IF COUNTRY EQ 'JAPAN' THEN 'JAPAN' ELSE '';
COUNTRY5/A10=IF COUNTRY EQ 'W GERMANY' THEN 'W GERMANY' ELSE '';
-*
SALES1/D11.2 = IF COUNTRY EQ 'ENGLAND' THEN SALES ELSE 0;
SALES2/D11.2 = IF COUNTRY EQ 'FRANCE' THEN SALES ELSE 0;
SALES3/D11.2 = IF COUNTRY EQ 'ITALY' THEN SALES ELSE 0;
SALES4/D11.2 = IF COUNTRY EQ 'JAPAN' THEN SALES ELSE 0;
SALES5/D11.2 = IF COUNTRY EQ 'W GERMANY' THEN SALES ELSE 0;
-*
DCOST1/D11.2 = IF COUNTRY EQ 'ENGLAND' THEN DEALER_COST ELSE 0;
DCOST2/D11.2 = IF COUNTRY EQ 'FRANCE' THEN DEALER_COST ELSE 0;
DCOST3/D11.2 = IF COUNTRY EQ 'ITALY' THEN DEALER_COST ELSE 0;
DCOST4/D11.2 = IF COUNTRY EQ 'JAPAN' THEN DEALER_COST ELSE 0;
DCOST5/D11.2 = IF COUNTRY EQ 'W GERMANY' THEN DEALER_COST ELSE 0;
-*
LINE1/A10 WITH CAR =IF COUNTRY EQ 'ENGLAND' THEN 'COUNTRY1' ELSE '';
LINE2/A10 WITH CAR =IF COUNTRY EQ 'FRANCE' THEN 'COUNTRY2' ELSE '';
LINE3/A10 WITH CAR =IF COUNTRY EQ 'ITALY' THEN 'COUNTRY3' ELSE '';
LINE4/A10 WITH CAR =IF COUNTRY EQ 'JAPAN' THEN 'COUNTRY4' ELSE '';
LINE5/A10 WITH CAR =IF COUNTRY EQ 'W GERMANY' THEN 'COUNTRY5' ELSE '';
-*
DUMMY/A10=' ';
-* For Conditional Styling
DUMMY2/A10=DUMMY;
END
-RUN
TABLE FILE CAR
SUM
MAX.COUNTRY1
MAX.COUNTRY2
MAX.COUNTRY3
MAX.COUNTRY4
MAX.COUNTRY5
-*
MAX.SALES1
MAX.SALES2
MAX.SALES3
MAX.SALES4
MAX.SALES5
-*
MAX.DCOST1
MAX.DCOST2
MAX.DCOST3
MAX.DCOST4
MAX.DCOST5
-*
MAX.LINE1
MAX.LINE2
MAX.LINE3
MAX.LINE4
MAX.LINE5
-*
DUMMY
DUMMY2
ON TABLE HOLD AS CAR2
END
-RUN
TABLE FILE CAR2
SUM
DUMMY AS '' NOPRINT
BY DUMMY NOPRINT
BY DUMMY2 NOPRINT
-* Always Show and Style
ON DUMMY SUBHEAD
"Line <+0>Country<+0>Sales<+0>Dealer Cost"
-*Using DUMMY2 Conditional Show and Style
ON DUMMY2 SUBHEAD
"<LINE1<+0<COUNTRY1<+0><SALES1<+0><DCOST1"
WHEN SALES1 GT 0
ON DUMMY2 SUBHEAD
"<LINE2<+0><COUNTRY2<+0><SALES2<+0><DCOST2"
WHEN SALES2 GT 0
ON DUMMY2 SUBHEAD
"<LINE3<+0><COUNTRY3<+0><SALES3<+0><DCOST3"
WHEN SALES3 GT 0
ON DUMMY2 SUBHEAD
"<LINE4<+0><COUNTRY4<+0><SALES4<+0><DCOST4"
WHEN SALES4 GT 0
ON DUMMY2 SUBHEAD
"<LINE5<+0><COUNTRY5<+0><SALES5<+0><DCOST5"
WHEN SALES5 GT 0
ON TABLE SET PAGE-NUM OFF
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.100000,
RIGHTMARGIN=0.100000,
TOPMARGIN=0.100000,
BOTTOMMARGIN=0.100000,
SQUEEZE=ON,
GRID=ON,
ORIENTATION=LANDSCAPE,
WRAP=OFF,
$
TYPE=REPORT, FONT='ARIAL', SIZE=8, $
TYPE=SUBHEAD,BY=DUMMY,LINE=1,HEADALIGN=BODY,SIZE=8,COLOR=WHITE,BACKCOLOR='BLUE',SQUEEZE=ON,$
TYPE=SUBHEAD, HEADALIGN=BODY, $
ENDSTYLE
END
Prod/Dev/Test: WF 8.1.5 on (Windows Server 2012 R2 ) SandBox: WebFocus Server 8.1.5 on Windows Server 2008 R2 WebFOCUS App Studio 8.1.5 and Developer Studio 8.1.5 on Windows 7
Posts: 134 | Location: USA | Registered: August 21, 2008