BookmarkSubscribeRSS Feed
mms40
Calcite | Level 5

I created graphs using PROC GPLOT and had the images saved as a GIF file.  I am trying to insert those images in PROC REPORT using the PREIMAGE option.  The images insert above the table like I want, however they are a bit small.  When I open the GIF file, the graph is normal size, but when its inserted in PROC REPORT, it shrinks it.  Is there a way I can stretch the size of the image when you insert it in PROC REPORT?

5 REPLIES 5
ballardw
Super User

Examples of your code would be helpful, including an graphics options.

As a minimum I would reset all graphics options.

mms40
Calcite | Level 5

I reset all graphics.  Here is is the code for the graph and the report:

goptions reset=all border cback=white htitle=12pt htext=10pt ftext=CENTB;

GOPTIONS GSFMODE=REPLACE GSFNAME=GRAPH1;

GOPTIONS DEVICE=GIF;

GOPTIONS HSIZE=10IN VSIZE=9IN;

FILENAME GRAPH1 "K:\Outcomes\ERSNAPSHOTS\ER_SNAPSHOTreports\FY 2013\PAGE2.GIF";

SYMBOL1 FONT=MARKER VALUE=U COLOR=BLUE  LINE=1 INTERPOL=JOIN WIDTH=4 HEIGHT=1;

SYMBOL2 FONT=MARKER VALUE=C COLOR=RED  LINE=1 INTERPOL=JOIN WIDTH=4 HEIGHT=1;

SYMBOL3 FONT=MARKER VALUE=P COLOR=GREEN LINE=1 INTERPOL=JOIN WIDTH=4 HEIGHT=1;

SYMBOL4 VALUE=DOT COLOR=BLACK LINE=1 INTERPOL=JOIN WIDTH=4 HEIGHT=1;

AXIS1 LABEL=NONE MINOR=NONE WIDTH=3;

AXIS2 ORDER=(0 TO 100 BY 10) LABEL=NONE MINOR=NONE WIDTH=3;

LEGEND1 LABEL=NONE ACROSS=2 FRAME ;

RUN;

PROC GPLOT DATA=THREEMONTHS2;

PLOT MORNING*DATE MI*DATE AD*DATE DUAL*DATE/    OVERLAY LEGEND=LEGEND1

                                                                        VREF= 0 TO 100 BY 10 LVREF=2

                                                                        HAXIS=AXIS1 HMINOR=4

                                                                        VAXIS=AXIS2 VMINOR=1;

RUN;

PROC REPORT DATA=PAGE2 NOWD NOHEADER

STYLE(REPORT)=[PREIMAGE='K:\Outcomes\ERSNAPSHOTS\ER_SNAPSHOTreports\FY 2013\PAGE2.GIF'];

TITLE1 'SUMMARY OF ER PATIENTS AWAITING STATE MENTAL HEALTH OR SUBSTANCE ABUSE INPATIENT ADMISSIONS';

TITLE2 ' ';

TITLE3 'THREE MONTH (TWELVE WEEKS) PERIOD ENDING: ' &DATE2;

TITLE4 ' ';

COLUMN _LABEL_ COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12;

FOOTNOTE1 H=1.5 PCT JUSTIFY=CENTER 'SOUTH CAROLINA DEPARTMENT OF MENTAL HEALTH--DIVISION OF EVALUATION, TRAINING, AND RESEARCH (ETR)';

RUN;

Cynthia_sas
Diamond | Level 26


Hi:

You did not say what type of ODS output you were creating: HTML, RTF or PDF? If you are using PDF or RTF, then the size of your image exceeds a piece of paper (8.5x11) -- your 10" would fit on a landscape page, but your 9" will not. Have you also changed PAPERSIZE or MARGIN options for your output? What type of output are you creating?

cynthia

mms40
Calcite | Level 5

Hi Cynthia,

I am using PDF for my ODS output and it is landscape. I changed the size to everything and it still didn't work.

Cynthia_sas
Diamond | Level 26

Hi:

  Then you might want to work with Tech Support, they can look at ALL your code and ALL your option changes and help you figure out what's going on.

  And, for PDF (and RTF), the image that you insert is converted from the original format (in this case, GIF) to an internal PDF file format.

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4053 views
  • 0 likes
  • 3 in conversation