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] Column styling problem using ACROSS

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Column styling problem using ACROSS
 Login/Join
 
Virtuoso
posted
Hello,

I have a seemingly simple issue: I have data that's sorted by date, which is printed (split into its components) as an ACROSS column. I want to highlight the columns that reflect a specific day of the week (in my case all Sundays).
The problem is that not every date has corresponding data, so I end up with a lot of empty, unstylable, cells.

For example, how do I highlight the entire Wednesday column in below?:
DEFINE FILE SALES
	SDat/I4MD = EDIT(DATE);
	LDat/I8YYMD = 20000000 + SDat;

	Year/YY		= LDat;
	Month/Mt	= LDat;
	Day/D		= LDat;
	Weekday/W	= LDat;
	WDay/A1		= DECODE Weekday(1 'M' 2 'T' 3 'W' 4 'T' 5 'F' 6 'S' 7 'S');
END
TABLE FILE SALES
SUM
	UNIT_SOLD
BY STORE_CODE AS 'Store'
ACROSS Year AS 'Date'
ACROSS Month AS ''
ACROSS Day AS ''
ACROSS WDay AS ''
END


Mind that with more data, as weeks repeat, there will be multiple Wednesdays on each row, which all need to be styled with a BACKCOLOR.

This message has been edited. Last edited by: Kerry,


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
This ugly code ensures there is a store sales value for every date in the request - either zero or the database value if it exists. I can't seem to style the weekday across value though... (My example styles Thursday as there is more than one across value).

-* File fpwep1.fex

-SET &ECHO=ALL;

SET PAGE=NOLEAD
SET HOLDLIST=PRINTONLY
-RUN

TABLE FILE SALES
SUM
DATE NOPRINT
COMPUTE DUMMY1/A1 = '';
BY DATE
ON TABLE HOLD AS H001 FORMAT FOCUS INDEX DUMMY1
END
-RUN

JOIN DUMMY1 WITH UNIT_SOLD IN SALES TO ALL DUMMY1 IN H001 AS J1
-RUN

DEFINE FILE * CLEAR
-RUN

DEFINE FILE SALES
SDat/I4MD   = EDIT(H001.DATE);
LDat/I8YYMD = 20000000 + SDat;
Year/YY     = LDat;
Month/Mt    = LDat;
Day/D       = LDat;
Weekday/W   = LDat;
WDay/A1     = DECODE Weekday(1 'M' 2 'T' 3 'W' 4 'T' 5 'F' 6 'S' 7 'S');
DUMMY1/A1   = '';
END
-RUN

TABLE FILE SALES
SUM
WDay NOPRINT
COMPUTE UNIT_SOLD/D7 = IF SALES.DATE EQ H001.DATE THEN UNIT_SOLD ELSE 0; AS ''

BY STORE_CODE AS 'Store'
BY DATE NOPRINT

ACROSS Year AS ''
ACROSS Month AS ''
ACROSS Day AS ''
ACROSS WDay AS ''

ON TABLE SET STYLE *
TYPE=DATA, ACROSSCOLUMN=UNIT_SOLD, WHEN=WDay EQ 'T', BACKCOLOR=YELLOW, $
-*TYPE=ACROSSVALUE, ACROSS=N4, BACKCOLOR=YELLOW, WHEN=N4 EQ 'T', $
END
-RUN


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
  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] Column styling problem using ACROSS

Copyright © 1996-2020 Information Builders