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 email@example.com for further assistance. Reference the community FAQ to learn more about the community.
1) you do not have CFLAG in your second matrix, hence the conditions can never be met. Add: BY CFLAG NOPRINT
to your output after the BY COUNTRY line.
2) You did not turn BYDISPAY ON, hence the only time you will ever see the COUNTRY value is when it changes. Since your backcolor is always white, I would just set the style to red italic for the country column and forget the conditions
3) Which brings me to issue 3, which is you did not include a COLUMN=N1, or COLUMN=COUNTRY, line in either TYPE=DATA, section of the style sheet, so the style would have affected all colimns had CFLAG been in the data set.
4) The first record displayed in a report has no "LAST" to compare to. The default here is that it is the first record IS the same as that non existant "LAST", hence using oyur techniques here, the first country will always be blue.
Hope this helps.
Robert F. Bowley Jr. Owner TaRa Solutions, LLC
In WebFOCUS since 2001
Posts: 132 | Location: Gadsden, Al | Registered: July 22, 2005
You probably want the whole line with a new country in italic red, if so, you need to make one small change - add "CFLAG NOPRINT":
SET NODATA = ' ', HOLDLIST = PRINTONLY
TABLE FILE CAR
COMPUTE CFLAG/A1 = IF COUNTRY EQ LAST COUNTRY THEN '0'
ELSE IF COUNTRY NE LAST COUNTRY THEN '1' ELSE '0';
ON TABLE HOLD AS FL1
TABLE FILE FL1
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
FONT='TIMES NEW ROMAN',
BACKCOLOR=RGB(255 255 153),
WHEN=CFLAG EQ '1',
WHEN=CFLAG EQ '0',
The WHEN clause in the stylesheet requires that the referenced field be in the report NOPRINT or not.
In my many years of WebFOCUS coding I have never NEEDed to code a MACRO in a stylesheet - some people may prefer to but I don't.
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