ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have a list of IDs only that I am trying to output on one page rather than have one column across multiple pages. What is the best way to do this?
3 REPLIES 3
deleted_user
Not applicable
are you prepared to have it in listing style result ? That would be something like [pre]
data _null_ ;
file print ;
put 'list of IDs' ;
do while( not end_of_data ) ;
set dataset_of IDs end= end_of_data ;
put id +2 @@ ;
end;
stop;
run;
Cynthia_sas
SAS Super FREQ
Hi:
It really depends on your destination of choice. If you need only the LISTING destination, then you could use PROC REPORT with the PANELS= option:
[pre]
ods listing;
proc report data=mydata nowd panels=3;
title 'Multi Column LISTING';
column id name;
define id / order;
run;
[/pre]

But PANELS= is a LISTING only option. If you wanted RTF or PDF, then you could use the COLUMNS= option to get multiple columns of output.
[pre]
ods pdf file='mult_col.pdf' columns=3;
ods rtf file='mult_col.rtf' columns=3 notoc_data;
[/pre]


I think that for HTML, you'd have to experiment with the HTMLPANEL tagset template or use a DATA step program. The general outline for an HTMLPANEL program would be:
[pre]

options orientation=portrait;
%let panelcolumns = 3;
ods tagsets.htmlpanel file='mult_col.html'
style=sasweb;

ods tagsets.htmlpanel event=panel(start);
** first procedure possibly with WHERE for IDs in first col;

** second procedure with WHERE;

** third procedure with WHERE;
ods tagsets.htmlpanel event=panel(finish);

ods _all_ close;
[/pre]

Or you can have HTMLPANEL work with BY groups, but that means you'd have to set a variable that said which column an ID would go into.

For more information on HTMLPANEL, consult this web site:
http://support.sas.com/rnd/base/ods/odsmarkup/htmlpanel.html

cynthia
deleted_user
Not applicable
Thank you both for the info. The column option for the ods pdf is exactly what I was looking for!

Scot

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1261 views
  • 0 likes
  • 2 in conversation