BookmarkSubscribeRSS Feed
twix17
Obsidian | Level 7
Hello Dear community,
 
I am trying to have two outputs on the same page but i am not getting a desired result.
 
Below is my code
Thanks for your help.

/*PRINT TABLE*/
ods escapechar="~";
options nodate;
options orientation=landscape leftmargin=0in pageno=1 rightmargin=0in topmargin=1in bottommargin=1in;
ods pdf startpage=never;
ods pdf file="output_path\output.pdf" notoc  ;
title;
/* Display Header */
proc report data=header nowd style(report)={just=left};
column col1 col2;
define col1 / display ' ' style(column)=[cellwidth=2in font_size=9pt font_face=calibri background=#90D5FF font_weight=bold]; 
define col2 / display ' ' style(column)=[cellwidth=3in font_size=9pt font_face=calibri];
run;

/* Display Body */
proc report data=data nowd style(report)={just=left};
columns <column list>;
define column_1 / 'column 1' style(header)={font_size=7pt font_weight=bold background=#90D5FF} style(column)=[cellwidth = 0.4in font_size=7pt font_face=calibri];
define column_2 / 'column 2' style(header)={font_size=7pt font_weight=bold background=#90D5FF} style(column)=[cellwidth = .6in font_size=7pt font_face=calibri];
define column_3 / 'column 3' style(header)={font_size=7pt font_weight=bold background=#90D5FF} style(column)=[cellwidth = 1in font_size=7pt font_face=calibri];
define column_4 / 'column 4' style(header)={font_size=7pt font_weight=bold background=#90D5FF} style(column)=[cellwidth = 0.8in font_size=7pt font_face=calibri];
define column_5 / 'column 5' style(header)={font_size=7pt font_weight=bold background=#90D5FF} style(column)=[cellwidth = 0.7in font_size=7pt font_face=calibri];
run;

ods pdf close;
5 REPLIES 5
Ksharp
Super User
Try
ods pdf startpage=never;
ods pdf file="output_path\output.pdf" notoc ;
----->
ods pdf file="output_path\output.pdf" notoc startpage=no;
twix17
Obsidian | Level 7

Hi @Ksharp 
I tried this but the output remains the same.
ods pdf file="output_path\output.pdf" notoc startpage=no;

Regards.

Ksharp
Super User

That is due to you are using "orientation=landscape " option which leave no enough room to include the second table. 

To make more room for second table ,try "papersize=(60in 80in)" option OR try "columns=2"option.

 


/*PRINT TABLE*/
ods escapechar="~";
options nodate;
options orientation=landscape papersize=A4 leftmargin=0in pageno=1 rightmargin=0in topmargin=1in bottommargin=1in;
ods pdf file="c:\temp\output.pdf" notoc  startpage=no columns=2;
title;
/* Display Header */
proc report data=sashelp.class nowd style(report)={just=left};
run;

/* Display Body */
proc report data=sashelp.class nowd style(report)={just=left};
run;

ods pdf close;

Ksharp_0-1720491082649.png

 

twix17
Obsidian | Level 7

Thanks @Ksharp 

The new update partially works but i would want the output in the format below

twix17_0-1720502760680.png

instead of side by side.

 

Thanks again for your help.

Ksharp
Super User

/*PRINT TABLE*/
ods escapechar="~";
options nodate;
options orientation=landscape leftmargin=0in pageno=1 rightmargin=0in topmargin=1in bottommargin=1in;
ods pdf file="c:\temp\output.pdf" notoc startpage=no ;
title;
/* Display Header */
proc report data=sashelp.class nowd style(report)={just=left cellpadding=0 cellspacing=0 };
run;

/* Display Body */
proc report data=sashelp.class nowd style(report)={just=left cellpadding=0 cellspacing=0 };
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
  • 5 replies
  • 243 views
  • 0 likes
  • 2 in conversation