BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Is there a way to automatically wrap titles onto the next line?
In my reports, it tends to resize the size of the titles between pages in order to fit on one line. Is there a way to enable wraparound text, or just run it, and add a second title line if necessary?
6 REPLIES 6
Cynthia_sas
SAS Super FREQ
Through the use of ODS ESCAPECHAR, you can insert an explicit line break into a title or footnote of ODS output. For example, if you define the escape character as a tilde (~), then the escape character sequence '~n' when inserted into the title would produce an explicit line break. A complete program that illustrates the behavior is shown below: [pre]

options orientation=portrait center;
ods pdf file='split_title.pdf';
ods escapechar='~';

title 'This is a Title ~n With a Line Break';
proc print data=sashelp.shoes(obs=100);
var region product sales;
run;
ods pdf close;[/pre]

cynthia
deleted_user
Not applicable
Thanks!
So, this will hardcode it in.. but is there a way that it will automatically wrap the line, rather than change the font size if the title happens to be too long?
Cynthia_sas
SAS Super FREQ
I don't understand what's happening in your Acrobat to the ODS PDF file. My title font size NEVER changes spontaneously or appears to when I open a PDF file. Your best bet for figuring this out may be to contact Tech Support.
cynthia
deleted_user
Not applicable
I have a multiple (60 page report) all with the same template, etc.
When I run it, some titles fit fine, others (long ones) get resized automatically because they wont fit..
I get this message:

WARNING: TITLE1 is too long. Height has been reduced to 77.34 pct of specified or default size.

So, it automatically reduces the height to make the text smaller, and the title shorter.
It's not a big deal, but I would prefer the option to wrap to the next line rather than make the text smaller.

Thanks!!
Cynthia_sas
SAS Super FREQ
Are you using SAS/Graph? I only get the TITLE1 reduced message if I have a long title being used within a SAS/Graph procedure. You could try deleting the title from the SAS/Graph procedure and using ODS PDF TEXT= to insert text strings -- sort of pseudo titles into the output. Again, Tech Support could help you with this.
cynthia
ScottH_SAS
SAS Employee
I would love to see a small snippet of code showing this problem. Perhaps I can find a workaround for you. Please email me at ods@.sas.com

Scott

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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