BookmarkSubscribeRSS Feed
keen_sas
Quartz | Level 8

Is there a way to change the font  and font size while creating the report using data _null_ (PUT statement). SAS itself provides the default font and size to the output winow using PUT statement , i want to change the font to Arial and font size to 12 using put statement . Are there any global options to change font and font size while displaying in Output window or in RTF file?.

Also i want to apply two different font and sizes like for body text one font (Times Roman) and  font size (10) ; for column headings (also want to BOLD the header + another font Courier New) and size (12) .

2 REPLIES 2
ballardw
Super User

If you add: File Print; to the data step the results are sent to the results window using your currently active style.

Using the old school and PUT to a file is pretty much plain text output that you'd have to post process to RTF.

You can attempt to use ODS RTF TEXT with escapechar to control text output but you're going to have lots of work ahead if you want anything to align. I would really look at my output and see if one of the report procedures like Tabulate, Reprot or Print would generate something acceptable. Those procedures provide inline options to override the current style font, size and many other appearance options.

Cynthia_sas
SAS Super FREQ

Hi:

DATA step output is controlled by the style template much better when you use FILE PRINT ODS. Regular old-fashioned FILE PRINT is considered "batch" level output and really has no formatting, as ballardw explains. I think that unless you want to get into the world of style templates and FILE PRINT ODS, that you will want to investigate PROC PRINT, PROC REPORT or PROC TABULATE for generating your report.

  Depending on the type of code you're writing with FILE PRINT and your PUT statements, you may or may not be able to replicate that for ODS RTF. It really depends on what you are trying to create. And since you didn't show data or output, your best bet for help might be to work with Tech Support on this question, because they can look at ALL your code and ALL your data and you can show them what you want to get and then they can make a recommendation.

cynthia

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
  • 2 replies
  • 3246 views
  • 1 like
  • 3 in conversation