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 Rate(%) Column and Date Column in a report and there is a Scenario where these come out to be null. The user requires me to print keyword 'Pending' instead of a Blank cell value Where Rate(%)/Date is null. I am not able to handle it using IF in a Define. I want something like:
-*RATE/D20.2= IF RATE IS MISSING THEN 'PENDING' ELSE RATE ; -*RATE/A20 = IF RATE IS MISSING THEN 'PENDING' ELSE RATE;
this leads to a Data Type Mismatch, the first line of code cannot store 'Pending', the second line cannot store RATE as it is D20.2.
In the end report i need to show
RATE 0.8 0.9 Pending Pending
Please Help Guys!This message has been edited. Last edited by: <Kathryn Henning>,
Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
You can also use dynamic formatting, search the forum for details.
It boils down to something like this:
DEFINE FILE FOO
RATEFMT/A8 = IF RATE IS MISSING THEN 'A20' ELSE 'D12.2';
END
TABLE FILE FOO
PRINT COMPUTE RATEX/RATEFMT = IF RATE IS MISSING THEN 'Pending' ELSE RATE;
END
It's a bit tricky to get to work. For example, the format-field HAS to be of type A8, no smaller or larger, or it won't work.
FPRINT is definitely easier to get to work. Often I accompany it with a flag-field for conditional styling - text is left-justified, numbers right-justified. Does the trick.
The only issue with FPRINT is if you export the data to a format where calculations are done on the result, but I sure hope nobody plans to do so if some of the values can contain 'Pending'!
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 :