I have 2 variables, a class term, and a specific term such that for 1 class term value there are many specific term values.
In proc report I have the class term listed before the specific term in the column statement. In the define statement for the class term I specify sort and noprint and I have a compute block where I specify for this variable to print only the first occurance.
The report lists the specific terms indented under the class terms, but if a class term continues on to the next page, you don't see the class term, while you see the rest of the specific terms.
What I want to know is how can I print the class term on the next page, in proc report, if the class term repeats on the next page? I'm looking for an easy solution in proc report. I've tried a number of things in proc report with no luck. I would like to hear from you if you have done this.
When I run this report (below) I get the "classterm" repeated at the top of the page in the LISTING and RTF destinations in SAS 9.1.3. HTML, of course, has no page breaks, so COMPUTE BEFORE _PAGE_ only appears at the top of each value for CLASSTERM variable. In SAS 9.1.3, the PDF file only uses the COMPUTE BEFORE _PAGE_ at the beginning of each CLASSTERM. However, in SAS 9.2, PDF and RTF outputs both have the same behavior (with the text string at the top of each page).
I'm not exactly sure of what you're trying to do, but if this program doesn't help you, then you might consider contacting Tech Support for more help.
** make some data;
length classterm $16 specific $16;
specific = catt('aaa',name);;
specific = catt('bbb',name);
specific = catt('ccc',name);
specific = catt('xxx',name);
specific = catt('yyy',name);
specific = catt('zzz',name);
options nodate number pageno=1 ls=80 ps=50;
ods html file='comp_before_page.html' style=sasweb;
ods rtf file='comp_before_page.rtf' ;
ods pdf file='comp_before_page.pdf';
proc report data=examp nowd;
title 'Use Compute Before Page and Compare Different Destinations';
column classterm specific height;
define classterm / order noprint;
define specific / order;
define height / sum;
break after classterm / summarize page;
compute before classterm;
holdterm = classterm;
compute before _page_;
line 'Term: ' holdterm $16.;
ods _all_ close;
Thank you for the response. I will try this when I get the chance. My output is lst so I don't know if this will work.
This is for doing adverse events incidence tables. Each system class terms has many preferred terms and many times an organ class's preferred term continue on the next page. proc report does not repeat the class term on the next page when the preferred term is indented under the class term, but we want to do it and add the text "(CONT.)" at the end of class term. Some persons developed very complex programming involving pre-processing to do it. I'm searching for an easier way.
Starting in SAS 9.2, the TAGSETS.RTF destination will automatically place the string "continued" at the bottom of the output when the output splits across pages.
This doesn't help with LISTING output. the only way to do this for LISTING output may be to post-process the output file. You might search the PharmaSUG archive site, www.lexjansen.com for some more examples.