DATA Step, Macro, Functions and more

Proc report page option

Reply
Super Contributor
Posts: 673

Proc report page option

Hi,
How to generate an output in rtf in a single page. The output is displayed on more than one page.but I need to show them in a single page.


I have two columns. Month and count. The month is from 2004 to may 2010.So for each month I calculate the count.in the proc report the out put flows to the next page.we need to display the whole output in a single page.

Month count
Jan04 25
Feb04 35
.
.
.
Jan10 30
.
,
May10 35
SAS Super FREQ
Posts: 8,866

Re: Proc report page option

Hi:
For ODS RTF and ODS PDF, you can use the COLUMNS= option in order to make a multi-column report.

cynthia

[pre]
ods listing close;
ods rtf file='c:\temp\twocols.rtf' columns=2;
ods pdf file='c:\temp\twocols.pdf' columns=2;

proc report data=sashelp.shoes nowd;
column region subsidiary n;
define region / group;
define subsidiary / group;
define n / 'Count';
run;

ods _all_ close;
[/pre]
Occasional Learner
Posts: 1

Re: Proc report page option

Posted in reply to Cynthia_sas
Does the 'column=2' option shown in your Jun-18 post work with ODS/XLM output? Thanks.
SAS Super FREQ
Posts: 8,866

Re: Proc report page option

Hi:
I'm not sure what you mean by ODS/XLM??? What destination is that???

I believe that if you follow the documentation link below, you will find that the COLUMNS= option is only documented as working for Printer family (ODS PDF) and RTF destinations:
http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002233360.htm (RTF)
http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002231506.htm (PDF)

You do not see the option in ODS LISTING destination doc, for example:
http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002231527.htm

To check other destinations (what you mean by ODS/XLM), check the destinations here:
http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002228116.htm

cynthia
Super User
Posts: 10,028

Re: Proc report page option

There is a option for proc report.


[pre]
proc report data=sas.help nowd panels=3 ;
...........
[/pre]


Ksharp
SAS Super FREQ
Posts: 8,866

Re: Proc report page option

Hi:
The PANELS= option for PROC REPORT is a LISTING only option. It will not work for ODS PDF or ODS RTF or ODS HTML. If you look on the PROC REPORT statement documentation page, you will see that some options, such as PANEL, HEADLINE, HEADSKIP, etc, all have an asterisk (*) after them:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#/documentation/cdl/en...

with the note that the asterisk means:
* Traditional SAS monospace output only. "Traditional SAS monospace" output means the LISTING destination or output window. Since the original poster said they were interested in RTF, that eliminated the use of PANELS= from being a possibility. Specifically, in the PANELS= documentation it states that:
Restriction: This option has no effect on ODS destinations other than traditional SAS monospace output. However, the COLUMNS= option in the ODS PRINTER, ODS PDF, and ODS RTF statements produces similar results.


Other PROC REPORT options are also LISTING options, such as BOX, COLWIDTH, FORMCHAR, SPACING, PSPACE and DEFINE and BREAK statement options such as: FLOW, WIDTH, DOL, DUL, OL, UL, For more information about the fact that these LISTING-only options do not work with other ODS destinations, see this Tech Support note:
http://support.sas.com/kb/2/549.html
and this "workaround" example code for how to simulate some of the options (mostly using CSS style properties):
http://support.sas.com/rnd/base/ods/templateFAQ/report1.html

cynthia
Super User
Posts: 10,028

Re: Proc report page option

Posted in reply to Cynthia_sas
thx. learned it from you.
Ask a Question
Discussion stats
  • 6 replies
  • 225 views
  • 0 likes
  • 4 in conversation