Help using Base SAS procedures

Inserting graphs in PROC REPORT

Reply
New Contributor
Posts: 3

Inserting graphs in PROC REPORT

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?

Super User
Posts: 10,483

Re: Inserting graphs in PROC REPORT

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

As a minimum I would reset all graphics options.

New Contributor
Posts: 3

Re: Inserting graphs in PROC REPORT

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;

SAS Super FREQ
Posts: 8,742

Re: Inserting graphs in PROC REPORT


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

New Contributor
Posts: 3

Re: Inserting graphs in PROC REPORT

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.

SAS Super FREQ
Posts: 8,742

Re: Inserting graphs in PROC REPORT

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

Ask a Question
Discussion stats
  • 5 replies
  • 1014 views
  • 0 likes
  • 3 in conversation