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.
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
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.
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. :-(
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
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
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