Hi...I am trying to insert the number and name inside the header using the byval() and it doesn't seem to work. Can this be done and used with the Column statement? Thanks.
ODS PDF FILE="%sysfunc(pathname(project))\&FILENAME Report (&rundate).PDF" STYLE=JOURNAL NOTOC BOOKMARKGEN=NO BOOKMARKLIST=NONE STARTPAGE=NOW;
OPTIONS NOQUOTELENMAX;
PROC REPORT DATA=FINALDATASET NOWD HEADLINE HEADSKIP MISSING ps=43 ls=108
style(report)={frame=box just=CENTER}
STYLE(header)={font_weight=bold background=lightgrey font_face=Arial
font_size=8pt borderwidth=1px bordercolor=black just=CENTER}
STYLE(COLUMN)={background=white font_face=Arial font_size=7pt borderwidth=1px
bordercolor=black just=CENTER}
STYLE(LINES)={JUST=C FONT_WEIGHT=BOLD FONT_SIZE=11PT};
WHERE CH_Number ="&CH_Number"
AND CH_Name ="&CH_Name";
BY CH_Number CH_Name;
COLUMN ("CH Number: #BYVAL(CH_Number) CH Name: #BYVAL(CH_Name)" LEVEL TOTAL_COST NUMBER_PURCHASES);
BY CH_Number CH_Name NOTSORTED;
DEFINE LEVEL / DISPLAY 'LEVEL' STYLE(COLUMN)={JUST=LEFT};
DEFINE TOTAL_COST / DISPLAY 'TOTAL COST' FORMAT=DOLLARr12.2 STYLE(COLUMN)={TAGATTR='format:$#,##0.00' JUST=RIGHT};
DEFINE NUMBER_PURCHASES / DISPLAY 'NUMBER PURCHASES' STYLE(COLUMN)={TAGATTR='format:#,##' JUST=RIGHT};
RUN;
Can you post a Screen Snap and a sample data to explain your question?
If you want use #byval ,firstly you need specify :
options nobyline;
And also you could try :
#BYVAL1
#BYVAL2
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.