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 would like to conditionally print one item from 2 or more possibilities in a report column.
Normally, I would define an item like so: ITEM/A8 = IF KeyField EQ 1 THEN 'ONE' ELSE IF KeyField EQ 2 THEN 'TWO' ......etc but in this case, ITEM is a different data type in each case (I know that's not a good scenario but it's what I'm stuck with). It doesn't work if I define the same name ITEM multiple times with different data types.
If I define ITEM1/A8 = IF KeyField EQ 1 THEN 'ONE' ITEM2/D8.1 = IF KeyField EQ 2 THEN 252.8 ....etc
...is there an easy way to tell the PRINT statement which ITEMn to use each time? If I could assign KeyField to an &variable I could use an -IF statement. Do I have to do a READ on the file for each record (see responses to my earlier post 'Variable column titles')
You want the column to be heterogeneous in a single execution, right?
If all the source fields were numeric (e.g., mixing yen, lira, dollars), you could define a single numeric field in the obvious "IF THEN ELSE ..." manner and use dynamic formatting ("Using Fields to Define Formats" feature).
But as you indicate it's a mix of numeric and alpha field, my only suggestion is to make the printing column a chacater define, using the KeyField to determine what source field to use and how to format it. You can use FTOA() to convert numeric fields into alpha.
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Jack, what you suggest is exactly what I did for the HTML and PDF versions of the report. But they also want the output in EXCEL, and while it still works, this column (actually there are 15 of them) comes out flagged as numeric data stored as alpha. Kind of ugly. Plus I figured that in a spreadsheet they'd want the numbers to actually be numeric, so I was trying to do that for them. I may be barking up the wrong tree all together - EXCEL probably doesn't even allow this mix of data types in a column?
Excel 'allows' the mix of data formats in columns but WebFOCUS doesn't create them in different formats.
The flagging of 'numeric data stored as alpha' is actually an Excel feature to highlight possible problems with the worksheet/book and. I think, can be turned off.
If you are on 5.3 or earlier then you could use an Excel workbook with VBA code to pull the data down and interpret the data contained within each cell and adjust the format as required.
If you are on 7.1 then you could output your WebFOCUS to a template with the same sort of functionality.
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004