BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I have created a ods pdf report by using the proc gprint procedure.Please find the below code.

file wanrpt "$SASDIR/text1.lst";
file wanexrprt "$SASDIR/text2.lst";

proc template;
define style Styles.Custom;
parent = Styles.Printer;
STYLE Data /
FONT_FACE = "Courier"
FONT_SIZE = 2
FONT_WEIGHT = medium
FONT_STYLE = roman
FOREGROUND = black
BACKGROUND = white;
STYLE Body /
FOREGROUND = black
BACKGROUND = white;
REPLACE Fonts/
'DOCFONT'="COURIER";

end;
run;

options orientation=landscape;
ODS LISTING CLOSE;
ODS PDF FILE="$HTMLDIR/rpts/OUT/Report1.pdf" style=Custom;
proc gprint fileref=WanExRpt;

title1 h=.5 ' ';
run;
proc gprint fileref=WanRpt;

title1 h=.5 ' ';
run;


Problem: Data is not fitting on the pdf report. some of the data is missing (means right 2 colums data is missing). I tried with Linesize= and Pagesize= options also but not successed. Could any one please suggest me which options are needful to fullfill my requirements.

Thanks,
Aruna.
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
PROC GPRINT is essentially making a PICTURE -- it would be unaffected by LINESIZE, PAGESIZE or SAS Style templates. Searching the support.sas.com site for GPRINT issues, reveals these:
http://support.sas.com/kb/3/828.html
http://support.sas.com/sassamples/graphgallery/PROC_GPRINT.html
http://support.sas.com/kb/25/585.html (uses HPOS and VPOS to increase output size of font -- NOT style template)

The technique, as described in this paper (http://www2.sas.com/proceedings/sugi22/ADVTUTOR/PAPER43.PDF) is from SUGI 22, which took place in 1997, quite a bit before ODS was released. Even this paper, from SUGI 28 was 6 years ago: http://www2.sas.com/proceedings/sugi28/141-28.pdf

Although these methods may seem attractive, other methods exist to either send LISTING type output to an image or make your ODS output from PROC PRINT, PROC MEANS, etc look like LISTING output in RTF, PDF and HTML destinations:
http://support.sas.com/kb/23/643.html
http://www2.sas.com/proceedings/forum2007/157-2007.pdf
http://support.sas.com/kb/24/056.html
http://support.sas.com/kb/24/493.html

I'm not sure what you're trying to achieve by using GPRINT, however, your LINESIZE and PAGESIZE options won't impact the GPRINT output. You either need to further study SAS/Graph syntax and GOPTIONS or work with Tech Support on another way to accomplish your goal.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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