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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
STYLESHEET question
 Login/Join
 
Gold member
posted
Basic request:

TABLE FILE T1
SUM VERBOBJ AS ' '
ACROSS EFFDATE
BY REPORT_NUMBER NOPRINT
BY ROWTITLE AS 'Label'
IF REPORT_NUMBER LE 4
ON TABLE SET ONLINE-FMT EXL2K
ON TABLE SET STYLE *
.
.
.
END

Note: VERBOBJ and ROWTITLE will be different fields depending on REPORT_NUMBER value. I used a MacGyver technique to accomplish this because I really have over 100 fields, not just the 4 sample rows shown here.

Report looks like this (sorry about the dots and dashes):

...................EFFDATE
Label...........01/06..........05/07...........02/08
NAME_____J.Smith_____J.Smith_____J.Smith
ADDRESS__11 Main St.__99 Elm St.__88 Sycamore St.
CITY______New York___Islip_______Boston
STATE_____NY________NY________MA



I'd like to BOLD the cell that has a different value than the value for the previous EFFDATE.

In this example, 99 Elm St. and Islip w/b bolded in EFFDATE column 05/07 and 80 Sycamore St., Boston and MA would be bold in EFFDATE column 02/08.

I've tried many styling combos without luck.

Any stylegurus out there?

Thanks!


WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
 
Posts: 84 | Registered: December 13, 2005Report This Post
Guru
posted Hide Post
im no style guru but saw a similar problem solved using computed fields- ie set up a compute which identifies the field that matches your requirement and set that as a flag- then on the style sheet do a when statement to turn text bold when the flag is present.

basically get WF to identify your field values and then use the styling when statements

can someone with better explanatory skills help if Micro doesn't understand as im off for the day now.


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
 
Posts: 285 | Location: UK | Registered: October 26, 2007Report This Post
Expert
posted Hide Post
I hope this illustrates what nubi suggested.

I haven't found a way to do it in one pass through the data.

SET ASNAMES=ON
SET HOLDLIST=PRINTONLY

DEFINE FILE CAR
WIDTHX/P7 = WIDTH;
END

TABLE FILE CAR
SUM
MIN.HEIGHT AS ''
BY COUNTRY
ACROSS WIDTHX
ON TABLE HOLD AS H001
END

?FF H001

TABLE FILE H001
PRINT *

COMPUTE E09FLAG/A1 = IF E09 NE E08 THEN 'Y' ELSE 'N'; NOPRINT
COMPUTE E08FLAG/A1 = IF E08 NE E07 THEN 'Y' ELSE 'N'; NOPRINT
COMPUTE E07FLAG/A1 = IF E07 NE E06 THEN 'Y' ELSE 'N'; NOPRINT
COMPUTE E06FLAG/A1 = IF E06 NE E05 THEN 'Y' ELSE 'N'; NOPRINT
COMPUTE E05FLAG/A1 = IF E05 NE E04 THEN 'Y' ELSE 'N'; NOPRINT
COMPUTE E04FLAG/A1 = IF E04 NE E03 THEN 'Y' ELSE 'N'; NOPRINT
COMPUTE E03FLAG/A1 = IF E03 NE E02 THEN 'Y' ELSE 'N'; NOPRINT

ON TABLE SET STYLE *
TYPE=DATA, COLUMN=E09, COLOR=RED, WHEN= E09FLAG EQ 'Y', $
TYPE=DATA, COLUMN=E08, COLOR=RED, WHEN= E08FLAG EQ 'Y', $
TYPE=DATA, COLUMN=E07, COLOR=RED, WHEN= E07FLAG EQ 'Y', $
TYPE=DATA, COLUMN=E06, COLOR=RED, WHEN= E06FLAG EQ 'Y', $
TYPE=DATA, COLUMN=E05, COLOR=RED, WHEN= E05FLAG EQ 'Y', $
TYPE=DATA, COLUMN=E04, COLOR=RED, WHEN= E04FLAG EQ 'Y', $
TYPE=DATA, COLUMN=E03, COLOR=RED, WHEN= E03FLAG EQ 'Y', $
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
Gold member
posted Hide Post
Thanks, Nubi. I had already successfully utilized the method you cite but would rather not code for every field (over 100). I was hoping there was some combo of STYLE statements that would do the trick.

Anyone else?


WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
 
Posts: 84 | Registered: December 13, 2005Report This Post
Virtuoso
posted Hide Post
You can avail yourself of the Dialogue Manager loop, throw in a couple counters with &variables and let it generate the code instead of having to hardcode all of it.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Microfich,

Try something like this. The key is to use the LAST keyword.

TABLE FILE EMPLOYEE
SUM JOB_DESC
COMPUTE JOBFLG/A1=
IF (EMP_ID EQ LAST EMP_ID) AND (JOB_DESC NE LAST JOB_DESC)
THEN '@' ELSE ' '; NOPRINT
BY EMP_ID
BY LAST_NAME
ACROSS DAT_INC
ON TABLE SET STYLE *
TYPE=DATA, ACROSSCOLUMN=JOB_DESC, COLOR=RED, STYLE=BOLD, WHEN=JOBFLG EQ '@',$
ENDSTYLE
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Gold member
posted Hide Post
Thanks, all!

I have succeeded via a combo of all your suggestions.


WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
 
Posts: 84 | Registered: December 13, 2005Report This Post
Guru
posted Hide Post
Hi Micro,

Glad you sorted it- yes the problem is i don't think you can use LAST statements within Style Sheet code so you would have to set a flag for that which will involve doing it for every field you want...

but if your styling is based on over 100 variables im not sure how you would get a good solution without hard coding every line or using some clever looping...


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
 
Posts: 285 | Location: UK | Registered: October 26, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders