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     [CLOSED] Conditonal formating based on Column number

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Conditonal formating based on Column number
 Login/Join
 
Gold member
posted
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
 
Posts: 69 | Registered: September 12, 2009Report This Post
Virtuoso
posted Hide Post
Check out thispost
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Gold member
posted Hide Post
Is there a way to reference database column to set the in the BACKCOLOR syntax like BACKCOLOR=N2 or BACKCOLOR=COLOR_CODE
instead of hard coding.

Thanks,
Ram


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Expert
posted Hide Post
Probably not, but you can set up WHEN clauses for different background colours.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
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
 
Posts: 69 | Registered: September 12, 2009Report This Post
Virtuoso
posted Hide Post
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


Hopefully this can give you a start point.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
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, 2007Report 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     [CLOSED] Conditonal formating based on Column number

Copyright © 1996-2020 Information Builders