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
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.
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.
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!
When you give us your SAS code include ODS statements.
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!
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.