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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 585 views
  • 2 likes
  • 2 in conversation