How to get rid off equal symbol in proc report output header ?
data test;
input id name $20.;
cards;
101 abc
102 def
103 gth
104 nmj
;
run;
proc report data=test headline nowindows ;by id;
columns id name;
run;
Basic approach is to 1) turn off the default by line behavior and 2) create a title (or footnote) with the special values #byvar (if you want the variable name) and #byval (for the value of the by variable).
There can be multiple by variables so you can address then by suffixing the keyword #byvar or #byval with the position number of the variable.
data test; input id name $20.; cards; 101 abc 102 def 103 gth 104 nmj ; run; /* turn off default var=value from BY statement*/ options nobyline; title "Your current title definitions"; title2 '#byvar1 #byval1'; proc report data=test headline nowindows ; by id; columns id name; run; /* restart the default by behavior*/ options byline;
Here I only have one existing line of title. The one to add would have a title line one or more greater than the last defined Title.
If you just one the by value after some nicer text you could use something like:
Title2 'Other text #byval1';
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.