Hi:
The correct absolute column reference is _cn_ (_c2_, _c3_, _c4_) as shown in my code. (Not _c_4, as you have shown.) If you are using that incorrect form of the absolute column reference in your code, you should be seeing this note in the Log:
[pre]
NOTE: Variable _c_4 is uninitialized.
[/pre]
If you have two items under an across variable, each item gets a unique absolute column number. When you use that unique column number in a CALL DEFINE statement, you can only "touch" the DATA cells for that column. I interpreted your original post as saying that you wanted the DATA cells under an ACROSS variable and the HEADER cells for the ACROSS variable to have the same style.
If you compare my code with your code, you will see that I blanked out the labels for the SALES variable -- because my format only "touched" the header cells for Asia, Canada and Pacific regions. If I had coded my column statement differently and had used a header string for Sales, :
[pre]
column product region,sales sales=alltot;
define product / group;
define region / across
style(header)={background=$reg.};
define sales / sum 'Sales';
[/pre]
(with the rest of the program unchanged), then you would see that each Header for Sales would be unaffected by the change to the ACROSS header above it. This is true because you have a DEFINE Statement for the ACROSS variable, where you can touch the header of the ACROSS variable, but you only have 1 DEFINE statement for the SALES variable (or for each variable under the ACROSS variable) and there's no CALL DEFINE way to change the header of the item under an ACROSS variable.
I -think- this is what you mean when you say that _c4_ is part of STSCBT column, because your original program had:
[pre]
proc report data=pol_10 nowindows split='|' out=a;
columns Ezor_c Hoze ,(Stscbt By_zone) Commerical;
define Ezor_c/'zone' group;
define Hoze/across format=hoze_label.;
define Stscbt/'Stscbt' sum format=comma20.;
define By_zone/'%|By Zone ' computed format=percent15.2;
[/pre]
where you have assigned labels to STSCBT and your calculated BY_ZONE. So, if you use a user-defined format to change the color of the HOZE variable, and you use CALL DEFINE to change the color of the STSCBT and BY_ZONE columns, the headers for STSCBT and BY_ZONE will use the header style from ODS. Is this what you're seeing???
You will probably need to use a different approach in order to get each STSCBT and BY_ZONE header to be the same color as the columns underneath them. So, for example, in the scenario below _c2_ and _c3_ are under the first value for HOZE and _c4_ and _c5_ are under the second value for HOZE and_c6_ and _c7_ are under the third value for HOZE...like this (let's assume that you have 3 values for the HOZE variable, HOZE1, HOZE2 and HOZE3):
[pre]
------HOZE1-------- ------HOZE2-------- ------HOZE3--------
Ezor_c STSCBT1 BY_ZONE1 STSCBT2 BY_ZONE2 STSCBT3 BY_ZONE3 Commercial
abs name: _c2_ _c3_ _c4_ _c5_ _c6_ _c7_
[/pre]
So when you say you ONLY want _c4_ to be styled --you could want to change the style for:
1) only HEADER cell for _c4_
2) only the DATA cells for _c4_
3) BOTH the HEADER cells and DATA cells for _c4_
4) _c4_ is UNDER HOZE2 -- so what impact or change should there be to the header for HOZE2??
a) HEADER for HOZE2 is same as from the ODS style
b) HEADER for HOZE2 should be the same as the _c4_ color
Can you clarify what you mean when you say "If i will put the style in the call define statment _c2_ will also be part of the style....I only want _c4_ will be styled" -- I don't understand this. I have already posted code that shows how the call define ONLY changes one absolute column. The CALL DEFINE for _c4_ should not have an impact on the datacells for _c2_. In my first program, the CALL DEFINE ONLY touched the "data" cells. In my program, I used a user-defined format to touch the header cells of the ACROSS variables. Also, are you sure you used _c4_ in the CALL DEFINE statement and not _COL_???
Thanks,
cynthia