Hi ,
I need to add a blank line after each category ("Discrepancy") in ods excel.
current output:
want output (spacing when values of 'Discreancy' changes):
current code:
proc report data=flufin;
title 'Flu';
columns subject serial compdtc ct fresult flg flg2;
define subject / display 'ID';
define serial / display 'Cart SN';
define compdtc / display 'Date';
define ct / display 'Ct';
define fresult / display 'Discrepancy';
define flg / display noprint;
define flg2 /computed noprint;
compute flg2;
if flg = 1 then do;
call define('subject','style','style={background=yellow}');
end;
endcomp;
run;
The basic thing you are looking for is
Compute after discrepancy;
line ' ';
endcomp;
which would expect Discrepancy to be either an ORDER or Group variable. That may mean that you need to add another variable with the group/order roll that is not printed.
Example that uses a data set you should have available so you can run this code.
proc sort data=sashelp.class out=work.class; by age; run; data work.class; set work.class; groupage =age; run; proc report data=work.class; columns groupage name age weight; define groupage/order noprint; define name /display; define age /display; define weight /display;
compute after groupage; line " "; endcomp; run;
The basic thing you are looking for is
Compute after discrepancy;
line ' ';
endcomp;
which would expect Discrepancy to be either an ORDER or Group variable. That may mean that you need to add another variable with the group/order roll that is not printed.
Example that uses a data set you should have available so you can run this code.
proc sort data=sashelp.class out=work.class; by age; run; data work.class; set work.class; groupage =age; run; proc report data=work.class; columns groupage name age weight; define groupage/order noprint; define name /display; define age /display; define weight /display;
compute after groupage; line " "; endcomp; run;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.