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

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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