The LINE
statement in Proc REPORT
is performed unconditionally.
From SAS Help
LINE Statement
Provides a subset of the features of the PUT statement for writing
customized summaries.
Restrictions:
This statement is valid only in a compute block that is
associated with a location in the report.
You cannot use the LINE
statement in conditional statements (IF-THEN, IF-THEN/ELSE, and
SELECT) because it is not executed until PROC REPORT has executed all
other statements in the compute block.
You can ensure the output from LINE contains a blank value for the 10th group.
data have;
do mygroup = 1 to 10;
do seq = 1 to 5;
x = mygroup * 100 + seq;
output;
end;
end;
run;
ods html close;
ods html;
proc report data=have;
define mygroup / order;
compute after mygroup / style={borderrightwidth=12 bordertopwidth=11 borderleftwidth=12};
length text $200;
if mygroup in (1,2,3,4,5,6,7,8,9) then do;
text = 'line from compute after mygroup. mygroup=' || put(mygroup,2.-L);
end;
else
text = ' ';
line text $char200.;
endcomp;
run;