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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at email@example.com and provide your corporate email address, company, and name.
you can even color chunks of rows , say when a byvalue changes, using this WHEN= technique, all depends how you set up your key. very cool and flexible. i set up my colors as &vars and load a color palette. -INCLUDE COLORS1 ..fex goes here TYPE=DATA,COLOR=&RGBALTROW,WHEN=KEY1 EQ 1,$ and for each app i might load a different color palette (COLORS1.fex) to set the &var &RGBALTROW so in the colors1.fex -SET &RGBALTROW = 'RGB(245 245 245)'; and lots more colors.. so for one application, &rgbaltrow might be grey and for another, &rgbaltrow might be pale blue. same fex, different colors. just an idea.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
FYI, You can do this on based a BY phrase as well and you can use more than two colors.
TABLE FILE CAR PRINT RCOST DCOST BY COUNTRY BY CAR ON TABLE SET BYDISPLAY ON ON TABLE SET STYLE * TYPE=REPORT, COLOR=NAVY, STYLE=BOLD,$ TYPE=DATA, BACKCOLOR=(BY=COUNTRY TEAL YELLOW GOLD),$ ENDSTYLE END
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
You can also use LIST and then use Boogardweeds method using the E01 alias. You need to make sure your data is already sorted before you use LIST though.
TABLEF FILE CAR LIST CAR ON TABLE HOLD END -RUN TABLE FILE HOLD PRINT CAR AND COMPUTE BAND1/I1=IF (IMOD(E01, 2, 'I6') NE 0) THEN 0 ELSE 1; NOPRINT ON TABLE SET ONLINE-FMT PDF ON TABLE SET STYLE * TYPE=DATA, BACKCOLOR=RGB(225 229 229), WHEN=BAND1 EQ 0,$ ENDSTYLE END
You are over complicating this! There is a feature in the STYLESHEET that lets you color alternating rows with a single command:
TYPE=DATA, FONT='ARIAL', COLOR='BLACK', BACKCOLOR=( 'WHITE' RGB(255 255 224) ), TOPGAP=0.013889, BOTTOMGAP=0.027778, JUSTIFY=RIGHT, $ The BACKCOLOR attribute is just set to the alternating colors you want, the rest is automatic.
Posts: 44 | Location: New York City | Registered: May 23, 2004