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-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1821 views
  • 0 likes
  • 2 in conversation