Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     differnt formatting on data rows and subtotals

Read-Only Read-Only Topic
Go
Search
Notify
Tools
differnt formatting on data rows and subtotals
 Login/Join
 
<Mairead Lawlor>
posted
Hi,
On my report I want amounts on the data rows to be formatted P18.2CB but on the subtotal rows I want to show a currency symbol P18.2CBM.

AMOUNT
10,000.00
20,000.00
30,000.00
subtotal $60,000.00

How can this be done?
Thanks in advance.
 
Report This Post
Master
posted Hide Post
Have two fields like

AMT/P18.2CB=AMOUNT;
AMT1/P18.2CM=AMOUNT;


TABLE FILE TEST
PRINT
AMT
AMT1 NOPRINT
ON TABLE SUBFOOT
"<AMT1 "
END
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
<Mairead Lawlor>
posted
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?
 
Report This Post
Expert
posted Hide Post
Hi Mairead,


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

TABLE FILE SUMMTRANS
PRINT BEG_BAL_MKT_VAL/FMT
....
...

ON LEGAL_ENT_NAME SUBFOOT
" <+5>Total<+0> <+0>/1"

This message has been edited. Last edited by: <Maryellen>,



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, 2004Report This Post
Gold member
posted Hide Post
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, 2003Report This Post
<Mairead Lawlor>
posted
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?
 
Report This Post
Platinum Member
posted Hide Post
Use something like the following:


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

Ken
 
Posts: 177 | Location: Calgary, Alberta, Canada | Registered: April 25, 2005Report This Post
Expert
posted Hide Post
Hi Mairead,

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.

Something like -

MYVALUE/A20 = SYM||FTOA(BEG_BAL_MKT_VAL,'(D12)','A18');

Good luck
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     differnt formatting on data rows and subtotals

Copyright © 1996-2020 Information Builders