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] STYLESHEET USAGE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] STYLESHEET USAGE
 Login/Join
 
Guru
posted
Hello,
We're trying to automate some column style using some RGB vals from a table. Wondering if theres a way to use either FUNCTION or Field value for BACKCOLOR property? Ideally we would pass a CAR value and get some STYLE from a function or a table in the below example. I didn't think it would work to start with but, figured I can always get your thoughts.

DEFINE FILE CAR
MAC1/A5 ='RED';
END
TABLE FILE CAR
PRINT SALES DEALER_COST
MAC1
BY COUNTRY
BY CAR
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = warm,
$
TYPE=DATA,
	COLUMN=N4,
	BACKCOLOR=customfunction(N1),
$
TYPE=DATA,
	COLUMN=N4,
	BACKCOLOR=BLUE,
	WHEN=N1 EQ 'FRANCE',
$
ENDSTYLE
END
  

This message has been edited. Last edited by: FP Mod Chuck,


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Virtuoso
posted Hide Post
Vaayu

I don't know of a way to reference a field value to show backcolor. You may need to create a HOLD file with the values and a -READFILE of the HOLD file to get them into a &variable that you can reference.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Platinum Member
posted Hide Post
Vaayu - check out this post: http://forums.informationbuild...107082196#8107082196
I think you could leverage their function code to do what you want.

--Deb


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
 
Posts: 183 | Location: Indiana | Registered: December 05, 2017Report This Post
Member
posted Hide Post
quote:
DEFINE FILE CAR
MAC1/A5 ='RED';
END
TABLE FILE CAR
PRINT SALES DEALER_COST
MAC1
BY COUNTRY
BY CAR
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = warm,
$
TYPE=DATA,
COLUMN=N4,
BACKCOLOR=customfunction(N1),
$
TYPE=DATA,
COLUMN=N4,
BACKCOLOR=BLUE,
WHEN=N1 EQ 'FRANCE',
$
ENDSTYLE
END


It's not a function but you can also add style to the cells by using html/css

  

DEFINE FILE CAR
MAC1/A15 =IF COUNTRY EQ 'ENGLAND' THEN 'RED' ELSE IF COUNTRY EQ 'FRANCE' THEN 'BLUE' ELSE 'YELLOW';
NEW_DEALER_COST/A100 = '<TD style="background-color:'|MAC1|';">' | EDIT(DEALER_COST) | '</TD>';
END
TABLE FILE CAR
PRINT SALES DEALER_COST NEW_DEALER_COST
MAC1
BY COUNTRY
BY CAR
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = warm,
$
-*TYPE=DATA,
-*	COLUMN=N4,
-*-*	BACKCOLOR=customfunction(N1),
-*$
TYPE=DATA,
	COLUMN=N4,
	BACKCOLOR=BLUE,
	WHEN=N1 EQ 'FRANCE',
$
ENDSTYLE
END

This message has been edited. Last edited by: Enrique R,


WebFOCUS 8.2.05
 
Posts: 3 | Registered: May 31, 2016Report This Post
Guru
posted Hide Post
Thank you all! I know this will be great for HTML output but what about EXL and PDF?
Appreciate as always!


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report 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] STYLESHEET USAGE

Copyright © 1996-2020 Information Builders