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

I need to output a sas report under proc report with ods excel and font_face="Calibri" my report does not come out in Calibri!!!

is there an exolication or solution how to divert the problem

data AA;
  infile datalines dlm=',';
  input Stn $ avg1 avg2 avg3 avg4;
datalines;
NE,11111,11111,11110,5555
NW,22222,11119,22223,2322
SE,33333,33333,33331,2309
SW,44444,44444,44444,1100
;
run;
ods excel file='';
proc report data=AA  
style(report)={font_face="Calibri"}
style(header)={font_face="Calibri"}
style(column)={font_face="Calibri"};
column  stn ("var1" avg1 avg2) ("var2" avg3 avg4);
define stn / order;
define avg1 /analysis;
define avg2 / analysis;
define avg3 / analysis;
run;
ods excel close;

 

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

@snip  - Did you read @Cynthia_sas 's response? Calibri is a Windows Truetype font. If your SAS isn't running on Windows then it is unlikely you will have this font. This program will list your SAS ODS fonts:

proc registry listhelp startat='ods\fonts'; run;

View solution in original post

9 REPLIES 9
ballardw
Super User

When I run that code the appropriate cells have Calibri as the font.

 

If you are running SAS with some networked version, Enterprise Guide or SAS on demand and the server that actually executes the code does not have the font installed then it cannot create documents with that font and will use the font defined in the current ODS style.

 

If the system viewing the result doesn't have the font then likely another font is substituted.

Cynthia_sas
SAS Super FREQ

@ballardw is correct. If the server or rendering system does not have Calibri, then another font is substituted. My understanding was that fonts like Calibri are Windows TrueType fonts and if, for example, your system server is a Linux or Unix server, they may not have any Windows fonts loaded. Do fonts that are "common" fonts like Courier or Times New Roman work? Can you check with your system administrator that Calibri is available?

Cynthia

snip
Obsidian | Level 7

I have the impression that my airlock does what it wants...

yesterday I told Calibri he was sending me mail. and today for courier, new time calibri it takes me out of Albany AMT..

I don't understand why each time he changes the font. I use style(report)=...

 

 

 

 

ballardw
Super User

@snip wrote:

I have the impression that my airlock does what it wants...

yesterday I told Calibri he was sending me mail. and today for courier, new time calibri it takes me out of Albany AMT..

I don't understand why each time he changes the font. I use style(report)=...

 


Sounds like a garbled AI wrote this.

snip
Obsidian | Level 7

I said that yesterday I executed my sas code with a "Calibri" style, sas gave me my report in Courier, and today I executed the same code..., the report that sas gave me released it was in Albany AMT,

so, I didn't understand why this bug

 

ballardw
Super User

Without actual code it is hard to tell.

One thing that persists across SAS sessions is the ODS STYLE setting. Changing the general Style setting will change many things graph colors, font sizes, font family, background colors. So a change in style will do such. IF your SAS admin is changing styles on you, or you experiment without realizing this then unexpected results.

 

You can override your default ODS style for different destinations as well, just add a Style=<some style name> to an ODS destination. 

 

Ods excel file="<some file name>" style=htmlblue;

or

Ods excel file="some other filename" style=meadow;

 

are likely to result in different appearance. You can also for some procedures change the general style just for that procedure. The report procedures Print, Report and Tabulate for example with the Style option.

 

 

snip
Obsidian | Level 7

Is there a way to check if my sas has Calibri or not?

 

SASKiwi
PROC Star

@snip  - Did you read @Cynthia_sas 's response? Calibri is a Windows Truetype font. If your SAS isn't running on Windows then it is unlikely you will have this font. This program will list your SAS ODS fonts:

proc registry listhelp startat='ods\fonts'; run;
snip
Obsidian | Level 7

Thank's

I tested and I don't have Calibri under sas

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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