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     Mulitiple Formats for one Field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Mulitiple Formats for one Field
 Login/Join
 
Silver Member
posted
At the carfuse in Chapel Hill there was technique shown where you can use multiple formats for a field. For instance I know that in my print statement I can use PCT1/D15.1S or PCT2/D15S% by Indicator (field), which results in 98.2 or 98%. I want to use the multiple formatting technique so that PCT1 can be 98% or 98.2 depending upon the indicator (field). Can someone send the code or point me in the right direction?


WebFOCUS 7.1.3 on Win 2000
 
Posts: 45 | Location: North Carolina | Registered: February 17, 2005Report This Post
Silver Member
posted Hide Post
I guess no one went to the CARFUSE meeting in Chapel Hill.

Does anyone have and idea how to do this?


WebFOCUS 7.1.3 on Win 2000
 
Posts: 45 | Location: North Carolina | Registered: February 17, 2005Report This Post
Guru
posted Hide Post
-SET &VAR1 = 'D15.5S';
-SET &VAR2 = 'D15S%';
-SET &FMT = IF INDICATOR EQ 'Y' THEN '&VAR1' ELSE '&VAR2';
DEFINE MY_FILE
FIELDX/'&FMT' = FIELDZ;
END
TABLE FILE MY_FILE
PRINT FIELDX
END

or

without the define
TABLE FILE MY_FILE
PRINT FIELDZ/'&FMT'
END


Understand that I am doing this from memory and that there may be a number of other ways to do this.
And forgive me if quote marks are wrong.

This message has been edited. Last edited by: jimster06,
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Virtuoso
posted Hide Post
An example:
  
DEFINE FILE CAR
FMT/A8=DECODE COUNTRY ( 'ENGLAND' 'P10!L' 'JAPAN' 'P10!Y' ELSE 'P10!E');
END
TABLE FILE CAR
SUM
     DEALER_COST/FMT
     RETAIL_COST/FMT
     SALES/FMT
BY COUNTRY
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
END


Result
 
COUNTRY DEALER_COST RETAIL_COST    SALES 
ENGLAND     £37,853     £45,319  £12,000 
FRANCE       €4,631      €5,610       €0 
ITALY       €41,235     €51,065  €30,200 
JAPAN        ¥5,512      ¥6,478  ¥78,030 
W GERMANY   €54,563     €64,732  €88,190 


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Silver Member
posted Hide Post
Thanks all, I will try it and let you all know the results.


WebFOCUS 7.1.3 on Win 2000
 
Posts: 45 | Location: North Carolina | Registered: February 17, 2005Report This Post
Silver Member
posted Hide Post
Thank you, thank you dhagen this is exactly what I needed and worked perfectly for my report. If anyone needs to show data in several formats line by line then this work for me. Some of my data needed to present as a percentage other as just a rate. Thanks again.


WebFOCUS 7.1.3 on Win 2000
 
Posts: 45 | Location: North Carolina | Registered: February 17, 2005Report 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     Mulitiple Formats for one Field

Copyright © 1996-2020 Information Builders