ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
sanjay1
Obsidian | Level 7

Hi Team,

 

I am trying to output the proc freq output of two datasets side by side using ODs PDF, but I am getting the first page as blank.

 

code :

 

ods pdf file='path.pdf' style=journal startpage=no;

ods layout gridded columns=2 advance=table column _width=(45% 45%);

 

ods region;

title "data1";

proc freq data=table1;

table unit*class/nopercent nocum norow nocol;

run;

 

ods region;

title "data2";

proc freq data=table2;

table unit*class/nopercent nocum norow nocol;

run;

ods layout end;

ods pdf close;

 

When I run the above code, I get the first page as blank. How do we avoid the black page in the output pdf.

 

 

 

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi,

  When I run a slightly modified version of your code, I do not observe the same behavior. Here's my output:

Cynthia_sas_0-1744242190053.png

 

And here's my code:

options label orientation=portrait leftmargin=.10in rightmargin=.10in;

ods noproctitle;
  
ods pdf file='c:\temp\checkODS.pdf' style=journal startpage=no;
ods layout gridded columns=2 advance=table;
ods region;
  
proc freq data=sashelp.class;
title 'SASHELP.CLASS';
table sex*age/nopercent nocum norow nocol;
run;

ods region;
 
proc freq data=sashelp.classfit;
title 'SASHELP.CLASSFIT';
table sex*age/nopercent nocum norow nocol;
run;
ods layout end;
ods pdf close;

  So I'm not sure what is happening to cause your code to get a blank page. You might want to work with Tech Support on this.

 

  Personally, I don't like the look of PROC FREQ output side by side and I probably would have used TABULATE or REPORT instead.

 

Cynthia

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 1 reply
  • 230 views
  • 2 likes
  • 2 in conversation