BookmarkSubscribeRSS Feed
dapstat
Fluorite | Level 6

My code (below) will not justify the data.  I have want numerical fields to be right justified and the column center justified.

 

When I define right justify for certain columns, it's all left justified.  

 

 

options papersize=legal orientation=landscape nodate nonumber;
ods html;
proc report data=d.profapp2 
style(report)=[cellspacing=.05 borderwidth=.001 bordercolor=grey bordertopcolor=grey borderleftcolor=grey 
fontfamily=Arial fontsize=2 cellheight=.05 background=white] split='*'
;


column mvint units prinamt mnthpmtequiv pmtterm apr fico custom monthlyinc timeataddress timeonjob housepay franch new ;

define mvint / right style(column)= [just=right fontweight=bold bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define units / right style(column)= [width=5 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define prinamt / right style(column)= [ width=12 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define mnthpmtequiv / right style(column)= [width=7 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2 ]; 
define pmtterm / right style(column)= [width=7 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define apr / right style(column)= [width=7 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define fico / right style(column)= [width=7 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define custom / right style(column)= [width=7 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define monthlyinc/ right style(column)= [ width=7 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define timeataddress/ right style(column)= [width=7 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define timeonjob/ right style(column)= [width=7 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define housepay/ right style(column)= [ width=7 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define franch/ right style(column)= [width=7 bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2]; 
define new/ style(column)= [ width=7 just=right bordertopcolor=grey borderbottomcolor=grey borderrightcolor=grey borderleftcolor=grey
fontfamily=Arial fontsize=2] ; 

run;
ods html close;

ods html outputods html output 

The attached image shows how it outputs

 

 

 

 

1 REPLY 1
ballardw
Super User

Can you provide a data step that will create 5 to 10 rows of data that we test code against?

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 1554 views
  • 0 likes
  • 2 in conversation