Friday, August 1, 2008

Why two proc reports?????

-
When proc report had more columns that do not fit in one page, I tried using two different proc reports. However the disadvantage of using two different proc report is, the report one: gets generated first…
-
To solve this problem, define a variable with ID. This ID variable appears at the left of every page of a report. Hence the use of ID ensures that you can identify each row of the report when the report contains more columns that will not fit in one page.
-
In the example given below, the variables (param & grade) act as an id variable. In the first page, these variables (param & grade) appear with other variables (pv1 pv2 pv3 pv4 pv5 pv6). Same way in the next page, it appears with the rest of the variables (pv7 - total).
-
options nocenter;
proc report data=final headline headskip nowd missing spacing=1 split ='*';
columns (param grade pv1 pv2 pv3 pv4 pv5 pv6 pv7 pv8 pv9 pv10 pv11 total);
-
define param- / order id left width = 30 "Parameter" spacing = 0 flow;
define grade-- / order id left width = 7- "Grade";
define pv1-----/---------. left width = 10 "Visit 1*(N=&vis1)";
define pv2-----/---------. left width = 10 "Visit 2*(N=&vis2)";
define pv3-----/---------. left width = 10 "Visit 3*(N=&vis3)";
define pv4-----/---------. left width = 10 "Visit 4*(N=&vis4)";
define pv5-----/---------. left width = 10 "Visit 5*(N=&vis5)";
define pv6-----/---------. left width = 10 "Visit 6*(N=&vis6)";
define pv7-----/---------. left width = 10 "Visit 7*(N=&vis7)";
define pv8-----/---------. left width = 10 "Visit 8*(N=&vis8)";
define pv9-----/---------. left width = 10 "Visit 9*(N=&vis9)";
define pv10----/--------.. left width = 10 "Visit 10*(N=&vis10)";
define pv11----/--------.. left width = 10 "Visit 11*(N=&vis11)";
define total-----/-------... left width = 10 "Overall*(N=&total)";
-
break after param / skip;
footnote1 "&under";
run;
-

No comments:

Post a Comment