BookmarkSubscribeRSS Feed
himself
Pyrite | Level 9

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;

himself_1-1624891901264.png

Thanks 

 

6 REPLIES 6
ballardw
Super User

@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;

himself_1-1624891901264.png

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
Pyrite | Level 9
Hi, thanks for the response, so what about the title for sales, that is at
the top of all the three columns. thanks
ballardw
Super User

@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
Pyrite | Level 9
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.
ballardw
Super User

@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.

Ksharp
Super User

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;

Ksharp_0-1624970427568.png

 

SAS Innovate 2025: Register Now

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!

How to Concatenate Values

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 6 replies
  • 1183 views
  • 1 like
  • 3 in conversation