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 was wondering if it's possible to display different formats in a single field for a report. I have 1 field in my data that displays all the values we may need for any measure. The format of the field is A50V, I need to display these values in this field as either percent, number or string depending on which measure the value is for. Is this possible??
Here is an example of what the data looks like Measure Name Score Measure 1 50 Measure 2 Very High Measure 3 88
Then here is what I need to the report to look like Measure Name Score Measure 1 50 minutes Measure 2 Very High Measure 3 88%
Any and all advice is appreciated, thanks!!This message has been edited. Last edited by: cldiaz,
Yes It is possible, Make conditional compute(varchar) in your table file request ,
Try Something like this, or paste your sample code
TABLE FILE CAR
SUM
COMPUTE SCORE/A28V = IF CAR EQ 'AUDI' THEN (PTOA(SEATS, '(P3)', 'A5V')|'%') ELSE IF CAR EQ 'BMW' THEN (PTOA(SEATS, '(P3)', 'A4V')|'Minutes') ELSE 'Very High'; AS 'Score'
BY CAR.COMP.CAR
WHERE CAR IN ('AUDI' , 'BMW' , 'ALFA ROMEO');
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END
---------------------
CAR |Score
-----------|-------
ALFA ROMEO |Very High
AUDI |5 %
BMW |29 Minutes
This message has been edited. Last edited by: Chaudhary,
You can DEFINE a format specifier field containing the desired WF display format and use that as your measure's type. This format field has to be absolutely positively specified as nothing else than type A8, or it won't work.
DEFINE FILE CAR
FMT/A8 = DECODE CAR ('AUDI' 'P3%', 'BMW' 'D12.3' ELSE 'D12');
END
TABLE FILE CAR
PRINT SEATS/FMT
BY CAR
BY MODEL
END
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
Or you may also want to take a look at FPRINT function
DEFINE FILE CAR
DCOST /P5 = DEALER_COST;
RCOST /P6CM = RETAIL_COST;
PCT /P6.1% = (RETAIL_COST - DEALER_COST) / RETAIL_COST * 100;
END
TABLE FILE CAR
SUM DEALER_COST
RETAIL_COST
DCOST
RCOST
PCT
COMPUTE MIXFIELD /A10V = IF COUNTRY EQ 'ENGLAND' THEN FPRINT(DCOST, 'P5', 'A10V') ELSE IF COUNTRY EQ 'ITALY' THEN FPRINT(RCOST, 'P6CM', 'A10V') ELSE FPRINT(PCT, 'P6.1%', 'A10V');
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'ENGLAND' OR 'ITALY' OR 'JAPAN';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013