BookmarkSubscribeRSS Feed
chjones
Calcite | Level 5

Greetings All! 

I am creating an executive report and need the appearance to follow a specific scheme as it is the first page of a report.  The desired output has the appearance below (notice the gray is centered on the page, but the test is justified left): 

chjones_1-1645828829201.png

 

 

Currently I have this, which has the gray box left justified: 

chjones_0-1645828795745.png

 

The code at the moment is this, and the third p statement runs on but is displayed in the above output: 

chjones_2-1645828986160.png

 

I have tried lots of different options including textalign, padding, etc.  I am not able to get the desired output. 

Any suggestions?

2 REPLIES 2
ballardw
Super User

Please post code as text in a code box. You can copy from the editor and then open either code box with the "running man" or a plain text box with the </> icons that appear above the message window. With text we can make edits a lot easier.

 

Proc ODSTEXT should be recognizing your SAS System option for Center/Nocenter.

I would try adding a line like this before your Proc:

 

options center;

to reset other output to left align:

options nocenter;

The options affect the entire output. Things like textalign, justification or padding only affect items in cells.

chjones
Calcite | Level 5

Sorry about the code, here is a text version for you:

ODS RTF file = "temp.rtf";

OPTIONS center;

PROC ODSTEXT PAGEBREAK = NO ;
p 'Executive Report' / style = {font_weight = bold FONT_SIZE=18pt FONT_FACE=Arial background = CXE8E8E8 COLOR = cx006298 width = 7in };
p ' ' /style = {FONT_SIZE=11pt JUST=L FONT_FACE=Arial background = CXE8E8E8 COLOR = cx006298 width = 7in};
p 'Some important text will be input in this one p statement, which will ultimately wrap across multiple lines. I would like the indent to maintain a constant size giving a solid gray box background appearance.' / style = {font_weight = bold FONT_SIZE=18pt FONT_FACE=Arial background = CXE8E8E8 COLOR = cx006298 width = 7in };
RUN;

ODS RTF CLOSE;

 

The options center is not giving me the desired output.  I appreciate the suggestion and let me know if anything is wrong with the code above.

 

Thanks again!

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
  • 2 replies
  • 309 views
  • 0 likes
  • 2 in conversation