BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
animesh123
Obsidian | Level 7

I want this Data to print in single page but it is splitting In two. Any suggestion please?

 

CODE.jpegOutput.jpeg

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
ods pdf file='c:\temp\temp.pdf' style=journal;
proc report data=sashelp.heart(obs=100) nowd style={outputwidth=100%};
define _all_/style(column)={cellwidth=5%};
run;
ods pdf close;

View solution in original post

11 REPLIES 11
ballardw
Super User

Proc Print output does that when the length of "printed" line exceeds the display area available.

 

You could use STYLE overrides on VAR statements to reduce the width of displayed columns or provide a larger space for the display.

 

It is extremely hard to tell what your code is as pictures are not clear but it appears you may be using PDF output. You can use the SAS Options statement, probably should be before the ODS PDF statement, to set either the ORIENTATION to landscape or the PAPERSIZE option to some larger display are or use a different ODS style that uses smaller fonts to reduce the space used.

animesh123
Obsidian | Level 7
What code should I write for SAS Options statement ?
ballardw
Super User

I would start with

options orientation=landscape;

However, if your table is longer than the resulting rotation of the print area will display you will have to use Papersize and that will depend on the actual data. So look in the online help for the options.

gema
Calcite | Level 5
options linesize=132 ps=10000 nocenter orientation=landscape;
Cynthia_sas
SAS Super FREQ

Hi: Linesize and Pagesize options are ignored by ODS DESTINATIONS. Especially destinations like ODS PDF and ODS RTF and ODS HTML and all the others except for LISTING really do not use Linesize and Pagesize options. Your output looked like RTF or PDF. As mentioned, your code is hard to read since it is a picture of a screen.

Cynthia

gema
Calcite | Level 5
Those are valid options in SAS. I typed my response in the reply box, so I am confused. I wasn't referring to ODS. Thanks,
ballardw
Super User

@gema wrote:
Those are valid options in SAS. I typed my response in the reply box, so I am confused. I wasn't referring to ODS. Thanks,

It is very hard to read but original question is sending output to ODS PDF. So for a workable solution to that question the should related to something that will affect output in ODS PDF.

Cynthia_sas
SAS Super FREQ
Hi, yes, you are correct, LINESIZE and PAGESIZE are valid SAS System Options. However, they are NOT used for all output creation. These options are designed for the LISTING output (or the Output Window). Other options, equally valid, such as DATE and NUMBER are used by ODS PDF, ODS RTF and the LISTING window, but are NOT used by ODS HTML or ODS CSV destinations. The bottom line is that the SAS System options may or may not be used when you create ODS output.

But, since you want PDF output, those settings will NOT be used for creating PDF output. You should use the topmargin, bottommargin, rightmargin, and leftmargin options along with the orientation=landscape option.
Cynthia
gema
Calcite | Level 5
Yes. I did not mean to imply that these options were intended for anything other than SAS listing output
Cynthia_sas
SAS Super FREQ
Hi:
I understand. I was confused because your screen shot was of ODS PDF output, so the LINESIZE and PAGESIZE were not involved in the reason your output was split. Which made me confused why there was even a suggestion to alter those 2 options.
Cynthia
Ksharp
Super User
ods pdf file='c:\temp\temp.pdf' style=journal;
proc report data=sashelp.heart(obs=100) nowd style={outputwidth=100%};
define _all_/style(column)={cellwidth=5%};
run;
ods pdf close;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 11 replies
  • 842 views
  • 0 likes
  • 5 in conversation