Hi!
How can i change this?
for this
You can use a COMPUTE BEFORE block to achieve this. See example below. note that the make column is not printed but used in the COMPUTE BEFORE together with the LINE statement.
proc report data=sashelp.cars;
column make model invoice horsepower;
define make / order noprint;
define model / display style={textalign=left};
compute before make /
style={backgroundcolor=lightblue textalign=left}
;
line make $20.;
endcomp;
run;
You can use a COMPUTE BEFORE block to achieve this. See example below. note that the make column is not printed but used in the COMPUTE BEFORE together with the LINE statement.
proc report data=sashelp.cars;
column make model invoice horsepower;
define make / order noprint;
define model / display style={textalign=left};
compute before make /
style={backgroundcolor=lightblue textalign=left}
;
line make $20.;
endcomp;
run;
You are welcome. Maybe it makes sense to buy this book https://support.sas.com/content/dam/SAS/support/en/books/the-sas-programmers-proc-report-handbook/69...
Sure just add the variables needed specify NOPRINT for the once you use in a COMPUTE BEFORE variable block.
proc report data=sashelp.orsales;
column year quarter product_line quantity;
define year / group noprint;
define quarter / group noprint;
define product_line / group;
define quantity / analysis;
compute before year;
line year 4.;
endcomp;
compute before quarter;
line quarter $6.;
endcomp;
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.