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;

sas-innovate-white.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.

 

Early bird rate extended! Save $200 when you sign up by March 31.

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
  • 5 replies
  • 800 views
  • 0 likes
  • 2 in conversation