Hi I need some help in left aligning the title Global shoes to appear on the left. bearing in mind that , we are speoifying the text at the column statement., Been looking for styling elements for this its to vain.
proc report data= sashelp.shoes nowd; column ('Global shoe sales in USD' ('Regional Shoe sales' region product subsidiary) ('In USD only' sales)); run;
Thanks
@himself wrote:
Hi I need some help in left aligning the title Global shoes to appear on the left. bearing in mind that , we are speoifying the text at the column statement., Been looking for styling elements for this its to vain.proc report data= sashelp.shoes nowd; column ('Global shoe sales in USD' ('Regional Shoe sales' region product subsidiary) ('In USD only' sales)); run;
Thanks
proc report data= sashelp.shoes style(header)=[just=l] ; column ('Global shoe sales in USD' ('Regional Shoe sales' region product subsidiary) ('In USD only' sales)); run;
If you want the column headers for Region, Product or Subsidiary centered you will need to add a DEFINE statement for each and override the now default Left header justification for those columns.
@himself wrote:
Hi, thanks for the response, so what about the title for sales, that is at
the top of all the three columns. thanks
When I run that I get the top "title" left justified. That option is setting ALL column headers to left justified. If you are getting different results then show the code you actually submit.
Global shoe sales in USD | |||
---|---|---|---|
Regional Shoe sales | In USD only | ||
Region | Product | Subsidiary | Total Sales |
Africa | Boot | Addis Ababa | $29,761 |
Africa | Men's Casual | Addis Ababa | $67,242 |
Africa | Men's Dress | Addis Ababa | $76,793 |
@himself wrote:
Sorry I mean to left align the title "Global shoe sales in USD" and "Regional Shoe
sales" to the left, as this cannot use the style for header.
Why not? That is the proper syntax tool to set justification for the header.
Perhaps read the documentation for the Report Writing Interface in the data step that allows a lot of control but requires you do everything that the Proc Report does.
Or try this workaround way ?
ods escapechar='~';
proc report data= sashelp.shoes nowd;
column ("Global shoe sales in USD %sysfunc(repeat(~_,100))"
(" Shoe sales %sysfunc(repeat(~_,100))" region product subsidiary) ('In USD
only' sales));
run;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.