BookmarkSubscribeRSS Feed
AggieGal
Fluorite | Level 6

Hello,

 

I've been trying to figure out how to create a THICK Border around my groups. A,B, C and sub-categories which add up to the Characters Name. I've attached what the final product needs to look like.

 

I've included the last compute statement that I came up with before asking for help.

 

This is the code I am using:

 

Proc Report data=Final_4SIMP out=Final_4SIMP_Table
nowindows nowd missing nocompletecols spanrows
style(report) =[borderwidth=2];
columns (SIMP_Order CIP_4SIMP Program_Order Program) 
(Acad_Period, (Homer Marge Bart Lisa Maggie "Stupid Flanders"n) ) ;

define Cart_Order / group " " order = internal noprint;
define Cart_4SIMP / group " " order=internal 
style(column)={tagattr='format:0000' vjust=m just=center }
;

define Program_Order / group " " order=internal noprint;
define Program / group " ";
define Acad_Period / across " " ;

define Homer / "Homer" format=comma10.0 style(column)=[tagattr='format:###,##0'] nozero;
define Marge / "Marge" format=comma10.0 style(column)=[tagattr='format:###,##0'] nozero;
define Bart / "Bart" format=comma10.0 style(column)=[tagattr='format:###,##0'] nozero;
define Lisa / "Lisa" format=comma10.0 style(column)=[tagattr='format:###,##0'] nozero;
define Maggie / "Maggie" format=comma10.0 style(column)=[tagattr='format:###,##0'] nozero;
define "Stupid Flanders"n / "Stupid Flanders" format=comma10.0 style(column)=[tagattr='format:###,##0'] nozero;
compute Program_Order ;
if Program_Order in (10, 11, 12, 13) then do;
call define(_row_,'style', 'STYLE={font_weight=bold BACKGROUND=cxD9D9D9}');
end;
endcomp;

compute Program;
if Program_Order in (2, 3, 4) then do;
call define(_col_,"style","style={indent=2}");
end;
endcomp;

compute CIP_4SIMP;
if CIP_4SIMP = ^. then do;
call define(_row_,'style','style={bordertopcolor=black bordertopwidth=2}');
end;
endcomp;
run;
1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  You don't show ALL your code. How are you creating output for Excel? Is Excel your desired destination of choice? If so are you using ODS EXCEL or ODS TAGSETS.EXCELXP? Or, did you want PDF or RTF output and you just showed your desired output in Excel because it was easier to alter the borders there?

 

  If you have some data to share, it would be nice to get that too, in the form of a DATA step program. That way, nobody has to try to guess what the structure of your data looks like.

 

  I don't actually see any difference in the border lines in what you pasted, perhaps it is my contacts or my glasses, but I don't see any border changes.

 

  And, finally, borders in Excel are tricky. Excel has its own way of setting borders and typically, if you want to change the border lines, for Excel, in particular, you need to make style template changes, not style override changes.

 

Cynthia

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 993 views
  • 0 likes
  • 2 in conversation