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 currently have a report which sums the field NET_WEIGHT which then has subtotals as dictated by the BY fields. However, i wish to exclude certain data from one of the subtotals. I have tried using a WHEN statement but to no avail. I have copied in my code below. How can i exclude a particular RTMCODE from the subtotal?
TABLE FILE FD_DESPATCH_STOCKS SUM NET_WEIGHT AS 'Free To Go(Kt)' AVE.DAYS_AS_COIL AS ' Avg FTG Coil Dwell (Days)' CNT.DAYS_AS_COIL AS 'No Of Coils FTG > 5 Days Dwell' MAX.DAYS_AS_COIL AS ' Top 20 Oldest Coils (Days)' BY CURRENT_SITE_CD AS 'Site' BY BAYGROUP AS 'Area' BY RTMCODE AS 'RTM (Supply Chain)' ON CURRENT_SITE_CD SUBTOTAL NET_WEIGHT AS '*TOTAL excl Unallocated' WHEN RTMCODE NE 'Unallocated'; ON BAYGROUP SUBTOTAL AS '*TOTAL' HEADING "Free To Go Stock Report" "Last Updated WHERE COILSTATUS EQ '1.Free To Go'; WHERE DAYS_AS_COIL GT 5; WHERE DAYS_AS_COIL LE 20; ON TABLE NOTOTAL ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, FONT='ARIAL', SIZE=8, $ TYPE=DATA, BORDER-TOP=LIGHT, BORDER-BOTTOM=LIGHT, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, FONT='ARIAL', SIZE=8, STYLE=BOLD, JUSTIFY=CENTER, $ TYPE=TITLE, BORDER-TOP-STYLE=SOLID, BORDER-BOTTOM-STYLE=SOLID, BORDER-LEFT-STYLE=SOLID, BORDER-RIGHT-STYLE=SOLID, STYLE=BOLD, JUSTIFY=CENTER, $ TYPE=HEADING, SIZE=10, BACKCOLOR=RGB(255 204 0), STYLE=BOLD, JUSTIFY=CENTER, $ TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=1, SIZE=8, $ TYPE=HEADING, LINE=2, OBJECT=FIELD, ITEM=1, SIZE=8, $ TYPE=SUBTOTAL, BY=1, BACKCOLOR=RGB(0 156 155), STYLE=BOLD, $ TYPE=SUBTOTAL, BY=2, BACKCOLOR=RGB(255 204 0), STYLE=BOLD, $ ENDSTYLE END
cheers
Stu.This message has been edited. Last edited by: Stuart,
TABLE FILE FD_DESPATCH_STOCKS SUM NET_WEIGHT AS 'Free To Go(Kt)' AVE.DAYS_AS_COIL AS ' Avg FTG Coil Dwell (Days)' CNT.DAYS_AS_COIL AS 'No Of Coils FTG > 5 Days Dwell' MAX.DAYS_AS_COIL AS ' Top 20 Oldest Coils (Days)' COMPUTE FLAG1/A1 = IF RTMCODE EQ 'Unallocated' THEN 'N' ELSE 'Y'; NOPRINT BY CURRENT_SITE_CD AS 'Site' BY BAYGROUP AS 'Area' BY RTMCODE AS 'RTM (Supply Chain)' ON CURRENT_SITE_CD SUBTOTAL NET_WEIGHT AS '*TOTAL excl Unallocated' WHEN FLAG1 EQ 'Y'; ON BAYGROUP SUBTOTAL AS '*TOTAL'
I have tried both suggestions and neither seem to work. Tom - when i run the fex using your code it does not display the subtotal for '*TOTAL excl Unallocated'..... any suggestions??
TABLE FILE CAR
SUM
RETAIL_COST
DEALER_COST
COMPUTE FLAG1/A1 = IF COUNTRY EQ 'JAPAN' THEN 'N' ELSE 'Y'; NOPRINT
BY COUNTRY SUBTOTAL DEALER_COST AS '*Total' WHEN FLAG1 EQ 'Y';
BY CAR AS '*Total' WHEN FLAG1 EQ 'Y';
BY MODEL
END
-EXIT
EDIT:
Stu, you need to bring RTMCODE in:
SUM
NET_WEIGHT AS 'Free To Go(Kt)'
AVE.DAYS_AS_COIL AS ' Avg FTG Coil Dwell (Days)'
CNT.DAYS_AS_COIL AS 'No Of Coils FTG > 5 Days Dwell'
MAX.DAYS_AS_COIL AS ' Top 20 Oldest Coils (Days)'
---> RTMCODE NOPRINT
COMPUTE FLAG1/A1 = IF RTMCODE EQ 'Unallocated' THEN 'N' ELSE 'Y'; NOPRINT
BY CURRENT_SITE_CD AS 'Site'
BY BAYGROUP AS 'Area'
BY RTMCODE AS 'RTM (Supply Chain)'
ON CURRENT_SITE_CD SUBTOTAL NET_WEIGHT AS '*TOTAL excl Unallocated' WHEN FLAG1 EQ 'Y';
ON BAYGROUP SUBTOTAL AS '*TOTAL' WHEN FLAG1 EQ 'Y';
This message has been edited. Last edited by: Tom Flynn,
0 ERROR AT OR NEAR LINE 7 IN PROCEDURE rep_srtest (FOC777) OPTION FOR 'ON' PHRASE IS NOT SUPPORTED WITH 'WHEN' CLAUSE (FOC009) INCOMPLETE REQUEST STATEMENT BYPASSING TO END OF COMMAND