BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Dave25
Quartz | Level 8

i'm trying to assign styles to individual parts in Proc Format, but no luck. (stripped down example, below)

Any suggestions on something else I might try?

Thanks for any ideas!

 


proc format;
value nfmt (default=20)
1 = “Change, +”
2 = "^{style [font_face=calibri font_weight=bold font_size=10pt]Change,}  ^{style [font_face=calibri font_size=18pt] -)"
;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

You need to set default= bigger. And change the quote around "Change,+" into English Version Quote.

 

proc format;
value nfmt (default=200)
1 = "Change, +"
2 = "^{style [font_face=calibri font_weight=bold font_size=10pt]Change,}  ^{style [font_face=calibri font_size=18pt] -}"
;
run;

data have;
input x;
format x nfmt.;
cards;
1
1
2
2
;
ods escapechar='^';
proc print;run;

Ksharp_0-1729925570937.png

 

View solution in original post

2 REPLIES 2
Ksharp
Super User

You need to set default= bigger. And change the quote around "Change,+" into English Version Quote.

 

proc format;
value nfmt (default=200)
1 = "Change, +"
2 = "^{style [font_face=calibri font_weight=bold font_size=10pt]Change,}  ^{style [font_face=calibri font_size=18pt] -}"
;
run;

data have;
input x;
format x nfmt.;
cards;
1
1
2
2
;
ods escapechar='^';
proc print;run;

Ksharp_0-1729925570937.png

 

Dave25
Quartz | Level 8
excellent! - thanks much

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 921 views
  • 0 likes
  • 2 in conversation