Date: Tue, 11 Jul 2006 05:11:04 -0400
Reply-To: Scott Bass <sas_l_739@YAHOO.COM.AU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Scott Bass <sas_l_739@YAHOO.COM.AU>
Subject: PROC REPORT - insert page in the middle
Hi,
Sorry for the simple question, but I just can't find this in the doc :-(
Test code:
data one;
do x=1 to 30;
select;
when( 0 <= x <= 10) pagevar=1;
when(11 <= x <= 20) pagevar=2;
otherwise pagevar=3;
end;
output;
end;
run;
proc report data=one nowd;
columns pagevar x;
define pagevar / order;
define x / display;
break after pagevar / page;
compute after pagevar;
if pagevar = 5 then do;
line @1 "foo";
line @1 " ";
line @1 "bar";
line @1 " ";
end;
endcomp;
quit;
1. What I really want to do is 1) print page 1, 2) print a page 2 using
line statements, then do a page eject, 3) then print pages 3 and 4 (page
values 2 & 3 respectively).
2. I don't get why the IF is ignored in the above code; foo bar gets
printed on each page.
The final output should be:
pagevar x
1 1
2
3
4
5
6
7
8
9
10
<page break>
foo
bar
<page break>
pagevar x
2 11
12
13
14
15
16
17
18
19
20
<page break>
pagevar x
3 21
22
23
24
25
26
27
28
29
30
I'd prefer using PROC REPORT vs. DATA _NULL_ because it's easier to add the
style code (final output is PDF). But, the end user really wants this
intermediate page in the middle rather than the end (It's just some text,
blank lines for writing comments under the text, and signature lines.
Pages 2 & 3 are appendices to Page 1 plus the signature page).
Thanks,
Scott