BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
shweta_d_singh
Fluorite | Level 6

Hi Everyone,

 

I have below data and I have used Proc report to create a RTF output I am trying to insert vertical border lines between columns but because I am using "compute before" statement the vertical lines get cut, I am expecting a straight line from up till down . Could anyone please help me with this ? (I have tried to put a blank row in data and then pass it in proc report that works but I am looking for more simple solution.)

 

My data:

shweta_d_singh_0-1591619009860.png

code:

Proc report data= class Headline Headskip NOWD split='|' missing;

column Name Sex Age Height Weight;

define name / Order "Name" style(header)=Header{just=left asis=on borderleftcolor=black borderleftwidth=1}
style(column)={just=left cellwidth=1.3in borderleftcolor=black borderleftwidth=1 };
define sex / "Sex" flow style(header)=Header{ just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1};
define age / "Age" style(header)=Header{just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1} ;
define height / "Height" flow style(header)=Header{just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1};
define weight / "Weight" flow style(header)=Header{just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1};

compute before name;
line " ";
endcomp;

run;

 

Output:

shweta_d_singh_1-1591619113901.png

Expected Output:

shweta_d_singh_2-1591619320574.png

 

 

Regards,

Shweta

1 ACCEPTED SOLUTION

Accepted Solutions
ed_sas_member
Meteorite | Level 14

Hi @shweta_d_singh 

 

Instead of computing a line before each record, I would just add a BREAK BEFORE statement and a "white color" for the font :

Proc report data= sashelp.class Headline Headskip NOWD split='|' missing;
column Name Sex Age Height Weight;
define name / Order "Name" style(header)=Header{just=left asis=on borderleftcolor=black borderleftwidth=1}
style(column)={just=left cellwidth=1.3in borderleftcolor=black borderleftwidth=1 };

define sex / "Sex" flow style(header)=Header{ just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1};
define age / "Age" style(header)=Header{just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1} ;
define height / "Height" flow style(header)=Header{just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1};
define weight / "Weight" flow style(header)=Header{just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1};

break before name / summarize style={color=white};

run;

Best,

View solution in original post

2 REPLIES 2
ed_sas_member
Meteorite | Level 14

Hi @shweta_d_singh 

 

Instead of computing a line before each record, I would just add a BREAK BEFORE statement and a "white color" for the font :

Proc report data= sashelp.class Headline Headskip NOWD split='|' missing;
column Name Sex Age Height Weight;
define name / Order "Name" style(header)=Header{just=left asis=on borderleftcolor=black borderleftwidth=1}
style(column)={just=left cellwidth=1.3in borderleftcolor=black borderleftwidth=1 };

define sex / "Sex" flow style(header)=Header{ just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1};
define age / "Age" style(header)=Header{just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1} ;
define height / "Height" flow style(header)=Header{just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1};
define weight / "Weight" flow style(header)=Header{just=center} style(column)={cellwidth=0.6in just=center borderleftcolor=black borderleftwidth=1};

break before name / summarize style={color=white};

run;

Best,

shweta_d_singh
Fluorite | Level 6
Thank you this worked best for me.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 973 views
  • 2 likes
  • 2 in conversation