BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
West26
Obsidian | Level 7

Hello,

I have the below issue with proc report:

Present proc report stmt:
proc report data= atpresent nowd  box nowd ls =256 split='*' STYLE(header)=[just=left BACKGROUND= gray  FONT_WEIGHT= bold];
        define Master_ID/display                 "Master ID"         style(column)={just=center tagattr="type:String"};
        define SUPERVISER_ID /display             "SUPERVISER ID"       style(column)={just=center tagattr="type:String"}; 

The variables should not split when they appear in the report:

Based on the lengh of the variable values, the variable names are displaying now like below

 

Master ID     SUPERVISER     EMPLOY Id        Report
                       ID                                                   Date
11111111111 22222222      AB1010101010   QX-XXXX

 

But I need SUPERVISE ID the same line like Master ID, same thing applies to Report Date as well.

I have tried by modifying the above proc report stmt, by removing the split='*' and adding a widht stmt like below, but doesn't seems to work.

proc report data= atpresent nowd  box nowd ls =256 STYLE(header)=[just=left BACKGROUND= gray  FONT_WEIGHT= bold];
        define Master_ID/display                 "Master ID"         style(column)={just=center tagattr="type:String"} width=12;
        define SUPERVISER_ID /display             "SUPERVISER ID"       style(column)={just=center tagattr="type:String"} width=12;

 

What should I do to get the report like

 

Master ID        SUPERVISER ID  EMPLOY Id          Report Date
                                   
11111111111  22222222            AB1010101010      QX-XXXX

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Easiest is likely to just make the column wider than the procedure is defaulting to for that variable.

 

define SUPERVISER_ID /display "SUPERVISER ID" style(column)={just=center cellwidth= 1.5in tagattr="type:String"};

 

would set the column width to 1.5 inches. You can use other units of measure like mm or cm if more comfortable with those. Adjust the number to the appearance you want.

 

 

View solution in original post

5 REPLIES 5
ballardw
Super User

Easiest is likely to just make the column wider than the procedure is defaulting to for that variable.

 

define SUPERVISER_ID /display "SUPERVISER ID" style(column)={just=center cellwidth= 1.5in tagattr="type:String"};

 

would set the column width to 1.5 inches. You can use other units of measure like mm or cm if more comfortable with those. Adjust the number to the appearance you want.

 

 

PaigeMiller
Diamond | Level 26

To help improve the readability of your code, please format it nicely, then click on the "running man" icon and paste the code into that box. Thanks!

--
Paige Miller
West26
Obsidian | Level 7
Thanks for the suggestion. Will do.
PhilC
Rhodochrosite | Level 12

When you give us your SAS code include ODS statements.  

West26
Obsidian | Level 7
Understood. Will do.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 5 replies
  • 1513 views
  • 0 likes
  • 4 in conversation