BookmarkSubscribeRSS Feed
hlnquynh
Obsidian | Level 7

Hello,

 

I would like to know if there is any way to modify the title (the width of left title collumn) so the left title would stay in one line.

I am using title statement:

title2 j=l "aaaa" j=r "(Page ${pageof})";

My_table.PNG

Need.PNG

Thank you in advance!

6 REPLIES 6
ballardw
Super User

I am afraid that you need to provide a bit more detail.

Like perhaps an example providing everything from the ODS rtf statement to the ODS rtf close.

Pick  a small data set supplied by SAS such as Sashelp.Class and generate similar output. Then post the entire code used.

 

Lots of things such as ODS options, procedure, procedure options, and styles used can all have an impact. When output gets placed into anything like a cell as shown in your picture if the text wraps you have the choice of making the cell bigger or the text smaller. But the appropriate method depends on what you are doing currently.

hlnquynh
Obsidian | Level 7

Thank you for considering but I can't post the entire code since I used company style template. 

 

Patrick
Opal | Level 21

I would expect what you want can be done but without more detail giving direction is close to impossible - unless someone as senior as @Cynthia_sas can guess from experience what you might be doing and what might be required.

hlnquynh
Obsidian | Level 7

As specific as I can, I am using a simple rtf style with ods.

 

ods listing close ;
ods results off ;

ods escapechar = '$' ;

 

title1 " ";
title2 j=l "A title that is way too long" j=r "(Page ${pageof})"; /* the header in rtf file that I need to modify */

 

/* The template I use */

options
orientation = landscape 
nodate 
nonumber
;


proc template;

define style 
styles_org.rtf;

parent=styles.rtf; 



rules = groups 
frame = hsides
cellpadding = 1pt 
cellspacing = 0pt 
just = left 
asis = on 
;



leftmargin = 20mm
rightmargin = 20mm
topmargin = 20mm 
bottommargin = 20mm
;



background = white 
just = left 
vjust = bottom 
;



'TitleFont' = ("times new roman",10pt,Medium) 
'TitleFont2' = ("times new roman",10pt,Medium) 
'docFont' = ("times new roman",10pt,medium) 
'headingFont' = ("times new roman",10pt,Medium) 
'FootnoteFont'= ("times new roman",10pt,Medium)

 


'StrongFont' = ("times new roman",8pt,Bold)
'EmphasisFont' = ("times new roman",8pt,Italic)
'FixedEmphasisFont' = ("times new roman",8pt,Italic)
'FixedStrongFont' = ("times new roman",8pt,Bold)  
'FixedHeadingFont' = ("times new roman",8pt,Bold)
'BatchFixedFont' = ("times new roman",6.7pt) 
'FixedFont' = ("times new roman",8pt)
'headingEmphasisFont'= ("times new roman",8pt,Bold Italic)

;


replace SystemFooter from TitlesAndFooters /
font = Fonts('FootnoteFont');

end;
run;

 

ods rtf file = "aaa"  style = styles_org.rtf;

proc report; run;

 

ods listing ;
ods results on ;
ods rtf close ;

 

I hope you could get the idea..

Cynthia_sas
SAS Super FREQ

Hi:

  I'm not sure what's happening with your template, since you didn't post working code, it was impossible to get a sense of what you were doing. Knowing whether and what you were using for a parent might explain your issues. But I tested a 2 part title with VERY long text and did not experience any issues, as shown below:

title_rtf_long.png

 

  I just used part of Jabberwocky by Lewis Carroll on both pieces of the title and left the page numbering turned on as well. As you can see in the screen shot, the text I used with the default style and the page numbers all fit.

  These are the options I used -- I moved your margins to the SAS option statement, since RTF and PDF are designed to use the system options for margins.

options orientation=landscape nodate nonumber
        leftmargin=20mm rightmargin=20mm
        topmargin=20mm bottommargin=20mm;

If you continue to have issues with the title, you might want to open a track with Tech Support. They can look at ALL your code, including ALL your template code and help you. I'm not entirely sure you need a custom template anyway. Using the same system options and regular Journal style worked for me, but I showed how to do the rules/frame in PROC REPORT as an override in this example:

title_rtf_journal.png

 

Hope this helps,

Cynthia

hlnquynh
Obsidian | Level 7

Thank you Cynthia,

I will try it!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 812 views
  • 1 like
  • 4 in conversation