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.
Hi, Is there a way to do conditional formating based on column number? We have a table with 15 columns First column holds the value to compare against Col3 - Col 15 to derive the colors red, green, yellow. Second column stores a value which tells: howmany columns needs to be color coded.
So is there any way to check/compare N1, N2 against the value in the column during conditional formating syntax?
Thanks, Ram.This message has been edited. Last edited by: Kerry,
WebFocus 7.7.01 Desktop: Windows and Server: Unix Excel, HTML, PDF
Thanks Francis.. The color code logic was done in another application and stored in the table. So wanted utilize that column to set to BACKCOLOR instead of repeating the same logic(which can be changed in the other app down the road) again in the report.
WebFocus 7.7.01 Desktop: Windows and Server: Unix Excel, HTML, PDF
It can't be done that way. BACKCOLOR and pretty much other all other style settings are based on constant values and not driven by fields ... I would love it if I could use a field's value in the TITLETEXT keyword for example.
If you REALLY need to have styling based on data, then you'll have to dynamically generate the styling based on what you have/need (using Dialogue Manager) before producing the actual report.
DEFINE FILE CAR
BKCOLOUR/A20 = IF COUNTRY EQ 'ENGLAND' THEN 'BLUE' ELSE
IF COUNTRY EQ 'JAPAN' THEN 'GREEN' ELSE
IF COUNTRY EQ 'ITALY' THEN 'YELLOW' ELSE 'NONE';
END
-* Distinct list of background colours
TABLE FILE CAR
PRINT DST.BKCOLOUR AS 'BKCOLOUR'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS HCOLOURS FORMAT ALPHA
END
-RUN
-SET &COLOURCNT = &LINES;
-* Do report with dynamic colours
TABLE FILE CAR
PRINT
CAR
MODEL
BKCOLOUR NOPRINT
BY COUNTRY
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
-* Set backcolour based on data
-REPEAT :STYBCKCOL FOR &I FROM 1 TO &COLOURCNT STEP 1
-READFILE HCOLOURS
-SET &BKCOLOUR=TRUNCATE(&BKCOLOUR);
TYPE=DATA, COLUMN=MODEL, BACKCOLOR=&BKCOLOUR.QUOTEDSTRING, WHEN=BKCOLOUR EQ &BKCOLOUR.QUOTEDSTRING, $
-:STYBCKCOL
ENDSTYLE
END
Another alternative, an example of which I believe I've seen posted before by Tony A, is to use TABLE FILE to write the StyleSheet statements to a SAVE file and then -INCLUDE the SAVE file within the StyleSheet for the main report.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007