Hi There,
I am using SAS 9.3 M1. I am unsuccessful in using the spanrows option in a plain rtf (no tagsets) output. It is working wonderful in the pdf destination but not with the rtf. It is combining all the rows into one cell but when the page breaks the row is not appearing in the new page. Is there any other option/statement I need to use with? Your advice will be appreciated.
Below is a sample test code.
data class30;
set sashelp.class;
do check = 1 to 30;
output;
end;
run;
ods rtf file ="&outpath.\class30.rtf";
proc report data=class30 nowd out=show spanrows;
column age name check sex;
define age /order;
define name / order ;
run;
ods rtf close;
Thanks,
Sunil
Hi:
It is strange that you do not want to use TAGSETS.RTF. Is there a reason for this requirement? That is really the solution to your issue in this case. If you run the code (a modification of your test), you will see exactly the output you want from the TAGSETS.RTF destination. Because TAGSETS.RTF does vertical measurement, and inserts explicit page breaks, Word knows exactly where to put the page break and the value repeats across pages. See the example in the attached screenshot, where the rows for Thomas split across pages. This output was created using TAGSETS.RTF.
cynthia
data class30;
set sashelp.class;
do check = 1 to 30;
output;
end;
run;
ods pdf file="c:\temp\class30.pdf";
ods rtf file ="c:\temp\class30.rtf";
ods tagsets.rtf file ="c:\temp\class30tr.rtf"
options(doc='help' continue_tag='no');
proc report data=class30 nowd spanrows;
column age name check sex;
define age /order;
define name / order ;
run;
ods _all_ close;
Thank you very much Cynthia. I will try using the tagsets. The reason I did not use tagsets is with plain RTF, I am getting everything what I require except the spanning of rows. Initially when I tried using the tagsets, I got all wierd page breaks, "Continued" text, and rtf codes (ex: \tq\b, \tqr\tx14050 ) etc. These did not happen after I shifted to plain rtf. (I am creating a define file where I am including multiple proc reports with different options for each (ex: startpage), under single ODS sandwich to have a single file).
Sunil
Hi Cynthia,
I can't use the tagsets option as we have an organization-wide RTF-setup macro. Is there a way around that, so that I can use SPANROWS option to repeat group/order variables?
With my existing code, (without tagset RTF), Order variables are not being repeated at new page beginnings even with the SPANROWS option.
Below is a sample code:
Thanks,
Abby
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.