hi
Im trying to generate a rtf file using proc report, but in output rtf file I'm getting empty space in right half of every page. Table is in only half of the page in landscape mode
How can I make the table to cover entire page ?
Please refer the attached pic for the empty space I'm referring to
My code high level is below
options orientation=landscape nodate PS=70 ls=120 nocenter nonumber nobyline
topmargin=1.5in bottommargin=1in leftmargin=1in rightmargin=1in;
title; footnote;
ods _all_ close;
ods rtf file="C:\result_op\op.rtf" startpage=yes style=tablertf BODYTITLE_AUX nogtitle;
ods escapechar='^';
proc report data = DS nowd spacing=2 headline headskip split = "|" nocenter missing;
columns /* column names */
**some define columns here ;
TITLE1 "Test Proc report ";
FOOTNOTE3 "* Number of Subjects is only counted for unique subjects";
run;
ods rtf close;
ods listing;
I have created it by overriding basic ones
made all fonts as Courier New, 9pt
background and text colors
table border styles
Do you have the same problem using a stock SAS style ?
Sorry, dont know about stock SAS style. What it has ?
But I have tried default template, and its same. Refer attached pic
Do the 'half-width' tables have any columns that are too narrow and data is wrapped in the cell (causing 'tall' rows') ?
No wrapping, please refer pic
Have you tried adding width= settings to certain columns to make them wider than ODS computed widths ? Something like:
DEFINE DESCRIPTION / style=[width=2.25in]; (What is equivalent code for spacing ?)
Great above width is working. I have tried below and it didnt work for width spacing even by using default template. Why ?
DEFINE DESCRIPTION / display DESCRIPTION width=20 spacing=5;
DEFINE options such as WIDTH= and SPACE= are only applied to ODS LISTING destination.
Check the Proc REPORT documentation. You will see disclaimers specific to LISTING, such as
WIDTH=column-width
defines the width oft he column in which PROC REPORT displays report-item.This option affects only LISTING output.
Hi:
You cannot confuse LISTING-only options with options that ODS honors. For example, system options like LINESIZE and PAGESIZE are ignored by ODS. Similarly, in PROC REPORT, options like BOX, WIDTH, SPACE, HEADLINE, HEADSKIP, DOL, DUL, OL, UL, SKIP etc -- these are all IGNORED by ODS DESTINATIONS, including ODS RTF. This Tech Support note http://support.sas.com/rnd/base/ods/templateFAQ/report1.html talks about how to simulate some of the LISTING only options in the ODS HTML destination.
And, although WIDTH= on a DEFINE statement will NOT work, using WIDTH= or CELLWIDTH= on a style override is honored by most ODS destinations. I suspect that much of your issue comes from expecting LISTING-only options to work with ODS destinations.
Cynthia
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.