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 have the following code. my problem is when I run the report the subfoot is not displayed. Hold3 is two reports hold1 and hold2 using the MORE command. Any ideas
DEFINE FILE HOLD3 FLAG1/A5=IF LINE_ITEM_ADJUSTED_TYPE EQ 'OTHR' OR 'CONN' THEN IF NEW_ITEMCODE NOT LIKE '%OTHR%' OR '%CONN%' THEN 'TRUE' ELSE 'FALSE'; END TABLE FILE HOLD3 PRINT 'QUANTITY' AS 'Quanity' 'NEW_ITEM_MEAS' AS 'Unit Meas' 'NEW_ITEMCODE' AS 'Item Code' 'SA_NUM' AS 'S.A.,Number' 'NEW_ITEM_DESC' AS 'Item,Description' 'PAGENUM' AS 'Page No.' 'AWD_UNIT_PRICE' AS 'Unit Price' 'ItemPaidAmt' AS 'Item Paid,Amount' 'CONTRACT_LINE_ITEMADJ_AMT' AS 'Line Item,Adjustment,Amount' 'LINE_ITEM_ADJUSTED_TYPE' FLAG1 BY 'PROJECT_ID' NOPRINT BY 'LINE_ITEM_NBR' NOPRINT ON 'LINE_ITEM_NBR' SUBFOOT "Contract Adjustments for Pay Item Code: WHEN FLAG1 EQ 'TRUE';
The define does not look correct to me. You are doing things that may not be officially supported. Try:
DEFINE FILE HOLD3
FLAG1/A5=IF (LINE_ITEM_ADJUSTED_TYPE EQ 'OTHR' OR 'CONN') THEN 'TRUE' ELSE
IF (NEW_ITEMCODE OMITS 'OTHR' OR 'CONN') THEN 'TRUE' ELSE 'FALSE';
END
I'm not sure I got your logic correct, but hopefully you get the idea.
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
Mike's IF statement is just fine even though it is not usually what WF coders use? I would prefer to use the second of these two -
FLAG1/A5 = IF COUNTRY EQ 'ENGLAND' OR 'JAPAN' THEN IF CAR NOT LIKE '%IUM%' OR '%SU%' THEN 'TRUE' ELSE 'FALSE';
FLAG2/A5 = IF ((COUNTRY EQ 'ENGLAND' OR 'JAPAN') AND (CAR NOT LIKE '%IUM%' OR '%SU%')) THEN 'TRUE' ELSE 'FALSE';
Both are seemingly the same although the second one is controlling the logic completely and is more readable. Again, it might not be exactly what Mike requires.
The main reason that I can see for the subfoot not being displayed (despite a typo) is that I am not sure on the validity of the WHEN clause combined with a SUBFOOT.
One method that would give you a subfoot is to extend your defines -
MYSUBFOOT/A80 = IF FLAG1 EQ 'FALSE' THEN 'Contract Adjustments for Pay Item Code:' ELSE '';
and then use it in the subfooting
ON LINE_ITEM_NBR SUBFOOT
"<MYSUBFOOT"
You could assign this value to FLAG1 instead of using the true or false values.
TThis message has been edited. Last edited by: Tony A,
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
You can certainly use WHEN with SUBFOOTs and have multiple lines with conditions. This is taken from a report that works:
ON PLWNTYP SUBFOOT
"Comments"
WHEN CMMT_1 NE ''
ON PLWNTYP SUBFOOT
"<USER_1> <DATE_1> <CMMT_1 "
WHEN CMMT_1 NE ''
ON PLWNTYP SUBFOOT
"<USER_2> <DATE_2> <CMMT_2 "
WHEN CMMT_2 NE ''
ON PLWNTYP SUBFOOT
"<USER_3> <DATE_3> <CMMT_3 "
WHEN CMMT_3 NE ''
ON PLWNTYP SUBFOOT
"<USER_4> <DATE_4> <CMMT_4 "
WHEN CMMT_4 NE ''
ON PLWNTYP SUBFOOT
"<USER_5> <DATE_5> <CMMT_5 "
WHEN CMMT_5 NE ''
ON 'LINE_ITEM_NBR' SUBFOOT "Contract Adjustments for Pay Item Code: WHEN FLAG1 EQ 'TRUE';
is the actual code, then it should be this:
ON 'LINE_ITEM_NBR' SUBFOOT "Contract Adjustments for Pay Item Code:" WHEN FLAG1 EQ 'TRUE';
Just a suggestion, but I'd also lose the single quotes on the fieldnames.
We just started testing 7.1.1 and IBI is really tightening up the code as to correct syntax - which is a very good thing, IMHO. Not sure if the "single quote" may be a problem, plus it might look a bit confusing to some.