Help using Base SAS procedures

Proc Report won't justify column data

Reply
Occasional Contributor
Posts: 7

Proc Report won't justify column data

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

 

 

 

 

Super User
Posts: 11,343

Re: Proc Report won't justify column data

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

Ask a Question
Discussion stats
  • 1 reply
  • 138 views
  • 0 likes
  • 2 in conversation