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 output
The attached image shows how it outputs
Can you provide a data step that will create 5 to 10 rows of data that we test code against?
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.