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.
Thanks for that. I want the formatting on the total amount to be conditional so that it shows different currency symbols. I have the following code which kinda illustrates what I want to do but does not work.
DEFINE FILE SUMMTRANS L_START_DATE/MDYY=START_DATE ; L_END_DATE/MDYY=END_DATE ; FMT/A8 = IF CURR_CODE EQ 'USD' THEN 'P18CBM' ELSE IF CURR_CODE EQ 'EUR' THEN 'P18CB!E' ELSE IF CURR_CODE EQ 'GBP' THEN 'P18CB!L' ELSE IF CURR_CODE EQ 'JPY' THEN 'P18!Y';
T_BEG_BAL_MKT_VAL/FMT = BEG_BAL_MKT_VAL ; END
ON LEGAL_ENT_NAME SUBFOOT " <+5>Total<+0> <+0><T_BEG_BAL_MKT_VAL<+0>/1"
I'm getting an error in the decalre for the T_BEG_BAL_MKT_VAL/FMT field. Is there a way I can apply this conditional formatting to the total?
I know you can conditionally reformat using the extended currency symbol, but I'm not sure that you can achieve it fully contained within the define. This would mean that you might not be able to use it in a subfoot. You could define a symbol and prefix your output field though!
The following will work -
DEFINE FILE SUMMTRANS L_START_DATE/MDYY=START_DATE ; L_END_DATE/MDYY=END_DATE ; FMT/A8 = IF CURR_CODE EQ 'USD' THEN 'P18CBM' ELSE IF CURR_CODE EQ 'EUR' THEN 'P18CB!E' ELSE IF CURR_CODE EQ 'GBP' THEN 'P18CB!L' ELSE IF CURR_CODE EQ 'JPY' THEN 'P18!Y'; SYM = IF CURR_CODE EQ 'USD' THEN '$ ELSE IF CURR_CODE EQ 'EUR' THEN '� ELSE IF CURR_CODE EQ 'GBP' THEN '� ELSE IF CURR_CODE EQ 'JPY' THEN '�; END
Well, if you wanted the formatting done on the detail line (with currency symbol), and then on a SUBTOTAL, it is relatively simple. However, the FMT does not work on a SUBFOOT (and I tried creating a new field with RECAP, and it didn't work), so this works: * * * TOP OF FILE * * * TABLE FILE CAR PRINT COMPUTE FMT/A8 = IF COUNTRY EQ 'ENGLAND' THEN 'D12.2!L' ELSE IF COUNTRY EQ 'FRANCE' THEN 'D7!E' ELSE IF COUNTRY EQ 'JAPAN' THEN 'I9!Y' ELSE 'D12.2M'; NOPRINT RCOST/FMT BY COUNTRY SUBTOTAL END
But if you must use SUBFOOT, then you are going to have to do what was recommended above, incorporate a currency symbol in the SUBFOOT.
Posts: 60 | Location: 2 penn | Registered: May 22, 2003
Thank you both for that. The requirement is that I only display the currency symbol on the total line and not the detila line so I must use the subfoot. What Tony has specified is working however I can not get the total columns to allign correctly with the detail amounts. There are spaces between the '$' and the amount field. Do you know if I can remove the spaces between the currency symbol and the amounts?
DEFINE FILE CAR RETAIL_COST1/P18.2CB=RETAIL_COST; RETAIL_COST2/P18.2CM=RETAIL_COST; END
TABLE FILE CAR PRINT RETAIL_COST1 RETAIL_COST2 NOPRINT BY CAR ON CAR SUBFOOT "<ST.RETAIL_COST2 " ON TABLE SET STYLE * TYPE=SUBFOOT, OBJECT=FIELD, ITEM=1, POSITION=RETAIL_COST1, $ ENDSTYLE END
The space will be as a result of using the two fields in the subfoot. If you had the grid turned on you will see that it is as a result of being in a seperate cell (TD in HTML).
Ken's suggestion is good but it still has the problem of being able to modify the currency symbol on the fly.
The alternative is to define a field concatenating the SYM character to the value having been passed through the FTOA function, but that would leave you with an alphanumeric field which may be difficult to align properly.