ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Kastchei
Pyrite | Level 9

Hello,

 

I am creating a PDF out of proc compare.  The output has an extreme amount of whitespace, such that a completely clean compare takes up an entire page.  This doesn't happen in the HTML output or listing output.  It almost looks as if the entire thing has been double-spaced.  Any ideas how to get rid of this?  Screenshots are attached.

 

Warm regards,

Michael

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ
Hi:
In my memory of some SAS output, PROC COMPARE doesn't work the way other ODS output works. The entire report from PROC COMPARE is put inside a "box" or container and then all the output is written out as it would have been written out in the "old days" before ODS -- as thought it were going to the old OUTPUT Window.

I do not believe there's a way to change the output from PROC COMPARE.

In the old days, I used to write PROC COMPARE to a .LST file or .TXT file using PROC PRINTTO and then open the .LST file with Word and "pretty it up". The type of output that is created is called "Batch output" from PROC COMPARE.

This document https://support.sas.com/rnd/base/ods/templateFAQ/ODS91.pdf has PROC TEMPLATE code for changing the font from SAS Monospace to a different font, but does not address the spacing issue or whitespace issue. You might want to check with Tech Support about whether there's a way to influence the spacing (but my guess is that there's not).

Cynthia

View solution in original post

3 REPLIES 3
Reeza
Super User

Show some code please that generates that output.

 


@Kastchei wrote:

Hello,

 

I am creating a PDF out of proc compare.  The output has an extreme amount of whitespace, such that a completely clean compare takes up an entire page.  This doesn't happen in the HTML output or listing output.  It almost looks as if the entire thing has been double-spaced.  Any ideas how to get rid of this?  Screenshots are attached.

 

Warm regards,

Michael


 

Reeza
Super User

Change your style to journal or minimal and set startpage to never. 

 

data cars;
set sashelp.cars;
call streaminit(25);
if age in (13, 14) then call missing(weight);
if age in (10, 12) then height = height + rand('normal', 5);
run;


ods pdf file='C:\_localdata\demo.pdf' style=minimal startpage=never;
proc compare data=cars compare=sashelp.cars;
run;
ods pdf close;

@Reeza wrote:

Show some code please that generates that output.

 


@Kastchei wrote:

Hello,

 

I am creating a PDF out of proc compare.  The output has an extreme amount of whitespace, such that a completely clean compare takes up an entire page.  This doesn't happen in the HTML output or listing output.  It almost looks as if the entire thing has been double-spaced.  Any ideas how to get rid of this?  Screenshots are attached.

 

Warm regards,

Michael


 


 

Cynthia_sas
SAS Super FREQ
Hi:
In my memory of some SAS output, PROC COMPARE doesn't work the way other ODS output works. The entire report from PROC COMPARE is put inside a "box" or container and then all the output is written out as it would have been written out in the "old days" before ODS -- as thought it were going to the old OUTPUT Window.

I do not believe there's a way to change the output from PROC COMPARE.

In the old days, I used to write PROC COMPARE to a .LST file or .TXT file using PROC PRINTTO and then open the .LST file with Word and "pretty it up". The type of output that is created is called "Batch output" from PROC COMPARE.

This document https://support.sas.com/rnd/base/ods/templateFAQ/ODS91.pdf has PROC TEMPLATE code for changing the font from SAS Monospace to a different font, but does not address the spacing issue or whitespace issue. You might want to check with Tech Support about whether there's a way to influence the spacing (but my guess is that there's not).

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
  • 3 replies
  • 3596 views
  • 3 likes
  • 3 in conversation