BookmarkSubscribeRSS Feed
Sami1234
Fluorite | Level 6

Hi there,

 

Wondering if someone can help me with how to underline 'including and 'excluding' word in col1 col2 from the proc report code below.

 

 

Proc Report Data=abc nowd headline split='!';

  column col1 col2 col3 ;

 

 

  define col1 / '  ' flow width=20;

  define col2 / 'Total  including A' display flow width=25;

  define col3/ 'Total excluding A' display flow width=25;

 

Thanks,

 

Sam

4 REPLIES 4
ChrisNZ
Tourmaline | Level 20

If you output to HTML, having start and end tags guarantees that inner tags are conserved.

proc Report Data=SASHELP.CLASS nowd headline split='!';
  column AGE SEX ;
  define AGE / '<a>Total <u>including</u> A</a>' ;
  define SEX / group;
run;
Total including A Sex
119 F
134 M

 

Sami1234
Fluorite | Level 6

Thanks for the reply!

It's not working as the output file required is PDF & RTF.

Would it be anyway to display the underline for the rtf and pdf outputs, please?

 

Many thanks,

Sam

Sami1234
Fluorite | Level 6

Following code is creating a line for the RTF output, but not in PDF output.

Wondering if any trick to do so in PDF or lst file.

 

ods rtf file=…….;

ods escapechar=’^’;

proc report data=SASHELP.CLASS nowd headline split='!';

 column AGE SEX;

  define AGE / “Total ^ul including ^ul0 A';

  define SEX / group;

run;

ods rtf close;

ballardw
Super User

You may be looking for text decoration

 

"^{style [textdecoration=underline]your text }

 

you will have to turn the decoration off after your value.

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
  • 4 replies
  • 3323 views
  • 0 likes
  • 3 in conversation