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.
TABLE FILE CAR SUM SALES BY COUNTRY ACROSS SEATS i get 3 columns, for 2-seater, 3-seater, 4-seater i want alternate column styling. not row, the 3-seater to be BLUE. TYPE=___?__ , ? ,BACKCOLOR=(RED BLUE),$ i've tried everything i can think of making me crazy. I could go ACROSS somekey NOPRINT and then do conditional styling based on key but i'ld rather stick needles in my eyes. Help??
nb: (just adding the keywords ALTERNATE ACROSS to this thread)This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
TABLE FILE CAR SUM SALES BY COUNTRY ACROSS SEATS HEADING "" FOOTING "" ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT,$ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9,$ TYPE=DATA, COLUMN=N2, BACKCOLOR=RED,$ TYPE=DATA, COLUMN=N3, BACKCOLOR=BLUE, COLOR=WHITE,$ TYPE=DATA, COLUMN=N4, BACKCOLOR=RED,$ ENDSTYLE END
WF 8 version 8.2.04. Windows. In focus since 1990.
Posts: 189 | Location: pgh pa | Registered: October 06, 2004
TABLE FILE CAR
SUM
SALES
BY COUNTRY
ACROSS SEATS
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9,$
TYPE=DATA, BACKCOLOR=WHITE,$
-REPEAT ENDREPS1 FOR &I FROM 2 TO 24 STEP 2;
TYPE=DATA, COLUMN=N&I, BACKCOLOR=RGB(200 200 200),$
TYPE=ACROSSVALUE, COLUMN=N&I, BACKCOLOR=RGB(200 200 200),$
-ENDREPS1
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
If you have two verb objects such as in the following example, you can simply use the ACROSSCOLUMN syntax.
TABLE FILE CAR SUM RCOST DCOST BY COUNTRY BY CAR ACROSS SEATS ON TABLE SET STYLE * TYPE=DATA, ACROSSCOLUMN=RCOST, BACKCOLOR=CYAN,$ TYPE=DATA, ACROSSCOLUMN=DCOST, BACKCOLOR=YELLOW,$ ENDSTYLE END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
y'all Nn is a verb object, not a column reference. In my case i only have 1 verb object, SALES, aka N1. and i gotta have 2 colors for the same field BACKCOLOR=(RED BLUE),$ its a piece of cake for rows. There's gotta be a way for columns....
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
TABLE FILE CAR SUM SALES BY COUNTRY ACROSS SEATS ON TABLE SET PAGE NOLEAD ON TABLE NOTOTAL ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, $ -*********************************************************** -REPEAT ENDREPS2 FOR &i FROM 3 TO 24 STEP 2; TYPE=DATA, COLUMN=N&i, BACKCOLOR=( RGB(0 0 255) 'RED' ) ,$ TYPE=ACROSSVALUE, COLUMN=N&i, BACKCOLOR=BLUE, COLOR=WHITE,$ -ENDREPS2 -*********************************************************** -REPEAT ENDREPS1 FOR &I FROM 2 TO 24 STEP 2; TYPE=DATA, COLUMN=N&I, BACKCOLOR=( RGB(255 0 0) 'BLUE' ) ,$ TYPE=ACROSSVALUE, COLUMN=N&I, BACKCOLOR=RED,$ -ENDREPS1 -*********************************************************** TYPE=DATA, BACKCOLOR=( RGB(228 233 233) 'WHITE' ),$ ENDSTYLE END
WF 8 version 8.2.04. Windows. In focus since 1990.
Posts: 189 | Location: pgh pa | Registered: October 06, 2004
It may be long, but the overall file size sent to the end users browser is smaller than it might be if he didn't use HTMLCSS ON.
The PM I sent to Susannah earlier had a version of this code within it, which is a combination of Spence and Francis' examples. It should provide the flexiblity for a varying number of columns produced by the ACROSS.
-SET &Column = 'MODEL';
-SET &Colours = 4;
-SET &Colour0 = 'RGB(128 255 255)';
-SET &Colour1 = 'RGB(128 255 128)';
-SET &Colour2 = 'RGB(255 128 128)';
-SET &Colour3 = 'RGB(255 255 128)';
-SET &Colour = 0;
TABLE FILE CAR
BY &Column
ON TABLE SAVE
END
-RUN
-SET &Cols = &LINES;
TABLE FILE CAR
SUM SALES
BY COUNTRY
ACROSS &Column
HEADING
""
FOOTING
""
ON TABLE SET PAGE NOLEAD
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, GRID=OFF, $
TYPE=REPORT, FONT='ARIAL', SIZE=9,$
-REPEAT :Loop FOR &I FROM 1 TO &Cols;
TYPE=REPORT, COLUMN=C&I, BACKCOLOR=&Colour&Colour.EVAL,$
-SET &Colour = IMOD(&I, &Colours, 'I1');
-:Loop
ENDSTYLE
END
Just change the &Column to the column that you want shown across and the &Colours variable to the number of colour changes you want. If you want more colours then you will have to add additional &Colour(n) variable(s) to match.
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, 2004
you're all wonderful. thanks for your replies. Spence, your code produces a checkerboard, which isn't exactly what i had in mind, but its quite interesting! T, i'll use C# notation, and loop, as you suggest. Very sweet code, thanks. It'll be faster your way than making a key value ACROSS key ACROSS SEATS which requires an interim hold file. Do you all agree that since its a piece of cake for ROWS and since the dreaded Cg-word does it easily, that this is a perfect NFR?
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
i went to FUSE today and learned from the BGH that in fact there is no cool quick way to do this in stylesheet, so i'm gonna open an NFR. Would you each do the same, and we might actually get some attn paid to the issue?
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003