Hi: First of all, the SAS/GRAPH forum is not the correct place to post a PROC REPORT question. But neither PROC PRINT nor PROC REPORT would produce a report like this without restructuring the data. If the OP wants an RTF output file, then they might consider using either a program like yours or something like this for a report. Cynthia ** Method 1 Use File PRINT ODS; ods rtf file="c:\temp\restructure_data_null.rtf"; data _null_; title '1) Use DATA step'; length repcol $50; set sashelp.class(keep=name sex height); file print ods=(variables=(repcol)); repcol = '~~~~~~~~~~'; put _ods_; repcol = name; put _ods_; repcol = sex; put _ods_; repcol = put(height,4.1); put _ods_; run; ods rtf close; ** Method 2 Use PROC REPORT; data restruct; length repcol $50; set sashelp.class(keep=name sex height); varord = 0; repord = _n_; varord +1; repcol = name; output; varord+1; repcol = sex; output; varord + 1; repcol = put(height,4.1); output; run; ods rtf file="c:\temp\restruct_report.rtf"; proc report data=restruct nowd; title '2) Use PROC REPORT with restructured data'; column repord varord repcol; define repord /order noprint; define varord / order noprint; define repcol/ display; compute before repord / style=Header; line '~~~~~~~~~~'; endcomp; run; ods rtf close;
... View more