BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have stored process which generates an output in any browser.
In my Stored process the final output comes through the list data task.
Can you tell me how can I change the font of my overall report to font_size=10 and font_face=arial..
4 REPLIES 4
Cynthia_sas
Diamond | Level 26
Hi, Sunil:
You would either
1) have to change the PROC PRINT code that is generated by the LIST Data task. There are style= overrides that you can use to change the font_face and font_style from the LIST Data task. Or,
2) you could check whether you have the possibility to use a custom CSS file at your site (assuming that your SP will ALWAYS be returning results to a web browser).

To use the style= overrides, you would need to add this code to your proc print (in bold):
[pre]
ods html file='c:\temp\testfont.html' style=egdefault;
proc print data=sashelp.class
style(table)={font_face="Arial" font_size=10pt}
style(header)={font_face="Arial" font_size=10pt}
style(data)={font_face="Arial" font_size=10pt}
style(total)={font_face="Arial" font_size=10pt}
style(obs)={font_face="Arial" font_size=10pt}
style(obsheader)={font_face="Arial" font_size=10pt}
style(grandtotal)={font_face="Arial" font_size=10pt};

sum age height;
var name age height;
run;
ods html close;

[/pre]

Note how these overrides all go on the PROC PRINT statement which will end with one and only 1 semi-colon after the last style override.

For more help with style= overrides in your stored process, you might consider contacting Tech Support or looking at the ODS documentation. For help with #2 and your stored process, you need to contact Tech Support.

As long as you are returning your SP results to a web browser, you should see these overrides used. However, other client applications in the BI platform, may not use the style= overrides, depending on which output type the client application is using to receive the results. (For example, Web Report Studio or PowerPoint through the SAS Add-in may not use these overrides or may use some, but not all of the overrides.)

cynthia
deleted_user
Not applicable
I am little bit confused where exactly i have to put that style statement in my proc print code if i want to use #1 method of yours.
for example if this is my code then

PROC PRINT DATA=WORK.SORTTempTableSorted
NOOBS
WIDTH=MINIMUM
SPLIT='*'
;
VAR Emp_id;
RUN;
Cynthia_sas
Diamond | Level 26
Try putting it anywhere on the PROC PRINT statement...here's the whole statement. It starts with the word 'PROC' and ends with the semi-colon after the SPLIT= option:
[pre]
PROC PRINT DATA=WORK.SORTTempTableSorted
NOOBS
WIDTH=MINIMUM
SPLIT='*'
*** put them here above the semi-colon ***
;

[/pre]

cynthia
ChrisHemedinger
Community Manager
You can also experiment with the different styles in the results options. If you are using SAS Report or HTML output, some of the predefined styles have larger fonts.

For example, if you want the "Mr. Magoo" settings, you might try the "Magnify" style.

Chris
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 2847 views
  • 0 likes
  • 3 in conversation