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     Alternate Color for Acrossvalue

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Alternate Color for Acrossvalue
 Login/Join
 
Guru
posted
Hi guys,

Another elementary question from me...

How do I get the alternate color to work on an acrossvalue? Here's the fex that doesn't work:

TABLE FILE CAR
SUM
     DEALER_COST
BY COUNTRY
ACROSS CAR AS '' ACROSS-TOTAL
ACROSS BODYTYPE AS '' ACROSS-TOTAL
ON COUNTRY SUBTOTAL AS '*TOTAL COUNTRY'
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
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=TITLE,
     STYLE=BOLD,
$
TYPE=ACROSSVALUE,
     SIZE=9,
	 STYLE=BOLD,
	 JUSTIFY=CENTER,
	 BACKCOLOR=('LIGHT BLUE' 'YELLOW'),
$
TYPE=ACROSSTITLE,
     STYLE=BOLD,
$
TYPE=GRANDTOTAL,
     BACKCOLOR='GRAY',
     STYLE=BOLD,
$
ENDSTYLE
END


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Virtuoso
posted Hide Post
I think that this has to be done manually
.
.
TYPE=ACROSSVALUE,
     ACROSS=CAR,
     SIZE=9,
     STYLE=BOLD,
     JUSTIFY=CENTER,
     BACKCOLOR='LIGHT BLUE',
$
TYPE=ACROSSVALUE,
     ACROSS=MODEL,
     SIZE=9,
     STYLE=BOLD,
     JUSTIFY=CENTER,
     BACKCOLOR='YELLOW',
$
.
.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
As Alan has already said, this is a manual process and not one that is currently catered for within syntax.

Susannah asked this exact same question a short while ago and there were a couple of good methods. Check out this post

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
Guru
posted Hide Post
whoa. I did the search using ALTERNATE ACROSS and that post didn't come up... or maybe I'm just getting old. But, I really thought it was as easy as alternating row colors... grrr. Thanks y'all.


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Expert
posted Hide Post
anatess, i just added the words 'ALTERNATE ACROSS' to the text of that thread, at your suggestion, to help future explorers.




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
Guru
posted Hide Post
Ya know, the post is A-1 definitely... but (I know, I know, sorry!)... it's not quite what I was looking for (and of course, I failed to express myself better above). Doing the loop trick across columns work well for the 2nd Across value, but I was hoping to have alternate colors on the first ACROSS value and not the 2nd. So, like in the sample code I have above, I was hoping that all columns under Alfa Romeo will have the light blue color, then all the columns under Audi would have the yellow color. Since I won't know how many BodyTypes there would be for each Car, I can't figure out a way to do the looping. :-(


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Expert
posted Hide Post
..you could cheat...
TABLE FILE CAR SUM CNT.DST.BODYTYPE BY CAR ON TABLE SAVE
END
-RUN
-SET &HOWMANYCARS = &LINES ;
..now -READ your SAVE file




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
Expert
posted Hide Post
Anatess,

You should be able to use the previous example as a base and build upon it -

-SET &Column = 'CAR';
-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;
-SET &ECHO = ON;
TABLE FILE CAR
SUM SALES
BY COUNTRY
ACROSS &Column
ACROSS MODEL
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 :Loop2 FOR &I FROM 1 TO &Cols;
-READ SAVE, &Parm
  TYPE=REPORT, ACROSSCOLUMN=N1, BACKCOLOR=&Colour&Colour.EVAL, WHEN=&Column EQ '&Parm', $
-SET &Colour = IMOD(&I, &Colours, 'I1');
-:Loop2
ENDSTYLE
END

Haven't tested it but it should be in the right area Smiler

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
Guru
posted Hide Post
Thanks Susannah, Tony. Now it works perfectly with this code:

-SET &Column = 'CAR';
-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;
-SET &J = 1;
-SET &Knt=0;
TABLE FILE CAR
SUM CNT.DST.MODEL
BY CAR
ON TABLE SAVE
END
-RUN
-SET &Cols = &LINES;
-SET &ECHO = ON;
TABLE FILE CAR
SUM SALES
BY COUNTRY
ACROSS CAR
ACROSS MODEL
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 :Loop2 FOR &I FROM 1 TO &Cols;
-READ SAVE &Kar.16 &Knt.I5
-REPEAT :Loop3 &Knt TIMES
-SET &J = &J+1;
  TYPE=REPORT, COLUMN=N&J, BACKCOLOR=&Colour&Colour.EVAL, $
-:Loop3
-SET &Colour = IMOD(&I, &Colours, 'I1');
-:Loop2
ENDSTYLE
END


This is exactly what I need.


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Expert
posted Hide Post
Glad you found a way.

It would be interesting to see how long it would take to achieve this using only the GUI .....

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
Guru
posted Hide Post
LOL! I'd venture a guess... Forever?


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report 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     Alternate Color for Acrossvalue

Copyright © 1996-2020 Information Builders