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     Styling duplicate rows.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Styling duplicate rows.
 Login/Join
 
Member
posted
I have a report like this:

col1 col2 col3
A 1 2
A 4 5
B 9 8
B 8 8

I need to create a style for each of the values that are in the first column.

For example, In this case, I need to color all rows that has 'A' in the first column should have Color A
and all the rows that has 'B' should have Color B so on and so forth.

Did anybody try this before ?
Appreciate your help.


USA
 
Posts: 8 | Registered: November 14, 2005Report This Post
Expert
posted Hide Post
amrav,

Try this sample
TABLE FILE CAR
SUM DCOST
    RCOST
BY COUNTRY
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=COUNTRY, COLOR=BLUE, WHEN=COUNTRY EQ 'ENGLAND', $
TYPE=DATA, COLUMN=COUNTRY, COLOR=RED, WHEN=COUNTRY EQ 'JAPAN', $
ENDSTYLE
END


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
TABLE FILE CAR
PRINT SALES CARS COUNTRY
ON TABLE SET STYLE *

TYPE=DATA,COLUMN=N1,COLOR='RED',WHEN=SALES GT 0,$
TYPE=DATA,COLUMN=N2,COLOR='YELLOW',WHEN=CAR EQ 'ALFA ROMEO',$
TYPE=DATA,COLUMN=N3,COLOR='GREEN',WHEN=COUNTRY EQ 'ENGLAND',$
ENDSTYLE
END


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Member
posted Hide Post
Appreciate your quick response. Tony.

In this case, Nothing is fixed. The values in col1 and number of rows are dynamic.
I can't hard code the value in the WHEN condition.

So far, the idea I can come up with is to find the no.of rows for a particular value in a table file block and then match it to the original hold file and then use that counter(whenever it is > 1) to style it.

I am wondering if there is a more efficient way to do this.


USA
 
Posts: 8 | Registered: November 14, 2005Report This Post
Expert
posted Hide Post
yeah there is...try working with this on the car file...you should get a color change each time the country changes and the color change should be teal first, then yellow for the next country group, and gold for the 3rd.
you can use 2 colors, or more...;
pick softer colors, of course...

TYPE=DATA, BACKCOLOR=(BY=COUNTRY TEAL YELLOW GOLD),$




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Thanks Susannah.
It worked.


USA
 
Posts: 8 | Registered: November 14, 2005Report This Post
Member
posted Hide Post
Susannah,

Need a little more help with this.

Is there anyway I can specify my own colors using the RGB combinations in the above statement ?

Thanks.


USA
 
Posts: 8 | Registered: November 14, 2005Report This Post
Guru
posted Hide Post
Is this what you are looking for?
TABLE FILE CAR
SUM 
     RETAIL_COST
BY COUNTRY
BY CAR
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
TYPE=DATA,
     COLUMN=N3,
     BACKCOLOR=( BY=B1 RGB(0 0 100) RGB(0 100 0) RGB(0 100 100) RGB(100 100 100) ),
$
ENDSTYLE
END
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Expert
posted Hide Post
Susannah, I did not know about that!

That's why you're the virtuoso!

Thanks,

Francis.

TABLE FILE CAR
PRINT SALES CARS
BY COUNTRY
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=(BY=COUNTRY TEAL YELLOW GOLD),$
ENDSTYLE
END


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
Expert
posted Hide Post
hahahahaha Big Grin
amrav, sure, just specify
(BY=COUNTRY RGB(230 255 230) RGB( 255 255 255))
if you want to simulate the old greenbar paper from mainframe printers. It'll alternate rows on your output




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Can you tell me if this function is available in 5.3.3

I tried adding this and it did not change the formatting of my spreadsheet.

Thanks


Web Focus version 7.1.4
Server Windows Server 2003
 
Posts: 26 | Registered: May 24, 2006Report This Post
Expert
posted Hide Post
TABLE FILE CAR
PRINT SALES CARS 
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=(BY=COUNTRY TEAL YELLOW GOLD),$
ENDSTYLE
END


Doesn't style in 5.3.2 but does in 7.1.3 when output is EXL2K.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 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     Styling duplicate rows.

Copyright © 1996-2020 Information Builders