As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Difference between revisions of "Tips:Using SPANROWS To Repeat Values Across Pages"

From sasCommunity
Jump to: navigation, search
m (fixed SAS forum thread link)
(gardening)
 
Line 2: Line 2:
 
set sashelp.class;
 
set sashelp.class;
 
do check = 1 to 30;
 
do check = 1 to 30;
  output;
+
    output;
  end;
+
    end;
  run;
+
run;
 +
 
 
ods pdf file ='c:\temp\class30.pdf';
 
ods pdf file ='c:\temp\class30.pdf';
 +
 
proc report data=class30 nowd out=show spanrows;
 
proc report data=class30 nowd out=show spanrows;
column age name check sex;
+
    column age name check sex;
define age /order;
+
    define age /order;
define name / order ;
+
    define name / order ;
 
run;
 
run;
 
ods pdf close;
 
ods pdf close;
 
</source></div>
 
</source></div>
  
The new ([[SAS]] 9.2) SPANROWS option on the PROC REPORT statement, provides a way to repeat the value of a GROUP or ORDER variable if that variable's value spans more than one page. The option works with RTF, PDF, and some other destinations.  See a [https://communities.sas.com/t5/SAS-Procedures/Detecting-Page-Break-in-PDF-Output-in-PROC-REPORT/m-p/69579 SAS Forum thread] on this.
+
The new ([[SAS]] 9.2) SPANROWS option on the PROC REPORT [[statement]], provides a way to repeat the value of a GROUP or ORDER variable if that variable's value spans more than one page. The option works with RTF, PDF, and some other destinations.  See a [https://communities.sas.com/t5/SAS-Procedures/Detecting-Page-Break-in-PDF-Output-in-PROC-REPORT/m-p/69579 SAS Forum thread] on this.
  
 +
{{clear}}
 
{{SubmittedBy|ArtCarpenter|Art Carpenter}}
 
{{SubmittedBy|ArtCarpenter|Art Carpenter}}
 
 
{{ExternalReadMore|http://support.sas.com/kb/35/544.html}}  
 
{{ExternalReadMore|http://support.sas.com/kb/35/544.html}}  
  
 
<noinclude>
 
<noinclude>
[[Category:Tip in Use]]
 
 
[[Category:REPORT Procedure]]
 
[[Category:REPORT Procedure]]
 +
[[Category:Tip in Use]]
 
</noinclude>
 
</noinclude>

Latest revision as of 12:25, 13 September 2017

data class30;
set sashelp.class;
do check = 1 to 30;
    output;
    end;
run;
 
ods pdf file ='c:\temp\class30.pdf';
 
proc report data=class30 nowd out=show spanrows;
    column age name check sex;
    define age /order;
    define name / order ;
run;
ods pdf close;

The new (SAS 9.2) SPANROWS option on the PROC REPORT statement, provides a way to repeat the value of a GROUP or ORDER variable if that variable's value spans more than one page. The option works with RTF, PDF, and some other destinations. See a SAS Forum thread on this.


Submitted by Art Carpenter. Contact me at my Discussion Page.

....see also