Hi,
I am trying to put a logo and 2 graphs (Barline/Plot and GChart) on a single PDF file... my issue is with the PDF output, both graphs are showing up okay on HTML view...
Issue 1) When I run the below code my first graph, Barline/Plot shows only Barline graph and not the plot...second graph, using GChart, looks okay... my logo do not appear as well... I've also attached my log chunk for your reference that shows some issues related to ActiveX control.
Issue 2) when I run the same code with goptions reset=all; then my Barline/Plot shows fine but it distrots my second chat and still I don't get my logo
Issue 3) when I use ODS layout with options reset=all; only then I get to see my logo as well as my barline/GChart, but still my second chart is distorted (removing formatting)
Please advice
Here are my log chunks
23
24 /***************Initiating**************/
25 options nodate nocenter orientation=PORTRAIT LEFTMARGIN=0.1in RIGHTMARGIN=0.1in
25 ! font=arial;
26 ODS PDF FILE="\\ServerName\file.pdf"
26 ! contents=no UNIFORM startpage=never;
WARNING: Unsupported device 'ACTIVEX' for PDF destination. Using device 'ACTXIMG'.
NOTE: Writing ODS PDF output to DISK destination
"\\servername\file.pdf", printer "PDF".
............
............
45 /******************Graph 1************************/
47 ods pdf text= '^S={font_size=20pt}';
48
49 SYMBOL1 INTERPOL=JOIN HEIGHT=3pt VALUE=DOT CV=CX370000 CO=MAROON LINE=1 WIDTH=2
49 ! CI=CXA60000;
50 PATTERN1 COLOR=CXBCBC78;
51 Legend1 FRAME LABEL=(FONT='Arial/Bold' justify=center 'Volumes') value=(' ') ;
52 Legend2 FRAME LABEL=(FONT='Arial/Bold' justify=center 'Time') value =(' ');
53 Axis1 STYLE=3 WIDTH=1 MINOR=NONE LABEL=(angle=90 rotate=0 FONT='Arial/Bold'
53 ! justify=center 'Axis1');
54
55 Axis2 value=(angle=45 rotate=0) LABEL=(FONT='Arial/Bold' justify=center '
55 ! Days');
56 Axis3 STYLE=1 WIDTH=1 MINOR=NONE LABEL=(angle=-90 rotate=0 FONT='Arial/Bold'
56 ! justify=center 'Time') ;
57 TITLE;
58
59 ods pdf text= "^S={just=center font=('Arial',14PT,Bold)} Title
59 ! ";
60 PROC GBARLINE DATA=WORK.table1;
61 BAR DAY_DATE / discrete SUMVAR=VOLUME
62 TYPE=SUM CLIPREF FRAME SUM COUTLINE=BLACK RAXIS=AXIS1 MAXIS=AXIS2 HREF=0 CREF=BLACK;
63 PLOT / SUMVAR=HLD_T TYPE=SUM AXIS=AXIS3 ;
64 format volume comma10.0;
65 format HLD_T comma10.0;
66 *format DAY_DATE Date5.;
67 RUN;
NOTE: ActiveX Control not available, defaulting to DEV=JAVAIMG.
68 Quit;
This version of the applet does not support Plot chart
Element Exception: Plot Name: Plot
Element Exception: Plot Name: Interpolation
3 The SAS System
Element Exception: Plot Name: Marker
Element Exception: Plot Name: Line
Element Exception: Legend Name: Legend
Here is my code
/***************Initiating**************/
options nodate nocenter orientation=PORTRAIT LEFTMARGIN=0.1in RIGHTMARGIN=0.1in font=arial;
ODS PDF FILE="\\ServerName\file.pdf" contents=no UNIFORM startpage=never;
*goptions reset=all;
ods escapechar='^';
title1 j=right height=10pt '^S={preimage="\\ServerName\Logo.JPG"}';
ods pdf text= "^S={just=center font=('Arial',16PT,Bold)} Main Title";
footnote1 j=right height=8pt font=arial "DATE: ¤t_worddate";
*ODS layout start columns=2;
*ODS region height=5in;
goptions vsize=4 in;
/******************Graph 1************************/
ods pdf text= '^S={font_size=20pt}';
SYMBOL1 INTERPOL=JOIN HEIGHT=3pt VALUE=DOT CV=CX370000 CO=MAROON LINE=1 WIDTH=2 CI=CXA60000;
PATTERN1 COLOR=CXBCBC78;
Legend1 FRAME LABEL=(FONT='Arial/Bold' justify=center 'Volumes') value=(' ') ;
Legend2 FRAME LABEL=(FONT='Arial/Bold' justify=center 'Time') value =(' ');
Axis1 STYLE=3 WIDTH=1 MINOR=NONE LABEL=(angle=90 rotate=0 FONT='Arial/Bold' justify=center 'Axis1');
Axis2 value=(angle=45 rotate=0) LABEL=(FONT='Arial/Bold' justify=center 'Days');
Axis3 STYLE=1 WIDTH=1 MINOR=NONE LABEL=(angle=-90 rotate=0 FONT='Arial/Bold' justify=center 'Time') ;
TITLE;
ods pdf text= "^S={just=center font=('Arial',14PT,Bold)} Title";
PROC GBARLINE DATA=WORK.Table1;
BAR DAY_DATE / discrete SUMVAR=VOLUME
TYPE=SUM CLIPREF FRAME SUM COUTLINE=BLACK RAXIS=AXIS1 MAXIS=AXIS2 HREF=0 CREF=BLACK;
PLOT / SUMVAR=HLD_T TYPE=SUM AXIS=AXIS3 ;
format volume comma10.0;
format HLD_T comma10.0;
*format DAY_DATE Date5.;
RUN;
Quit;
/******************Graph 2************************/
*ODS region height=5in;
ods pdf startpage=now;
ods pdf text= "^S={just=center font=('Arial',14PT,Bold)} Title Graph2";
Axis1 STYLE=1 WIDTH=1 MINOR=NONE LABEL=(angle=90 rotate=0 FONT='Arial/Bold' justify=center 'Level');
Axis2 value=(angle=45 rotate=0) LABEL=(FONT='Arial/Bold' justify=center 'Days');
Axis3 STYLE=1 WIDTH=1 LABEL=( FONT='Arial' "Category");
PROC GCHART DATA=Table2;
BLOCK DAY_DATE / DISCRETE sumvar=VOLUME SUBGROUP=CATEGORY GROUP=CATEGORY NOLEGEND
RAXIS=AXIS1
MAXIS=AXIS2
GAXIS=AXIS3;
format volume comma10.0;
RUN;
Quit;
*ODS Layout end;
ODS PDF close;
In what way is your second graph distorted under your scenario 3? What formatting is removed?
Try renaming the AXIS statements for the second graph as AXIS4 through AXIS6 and modify the references to match and see if that changes anything.
Hi ballardw,
I've tried to rename the Axis statement but it didn't worked...
Thanks
Since your axis labels don't quite match what appears in the AXIS statements there's something else going on.
I would suggest running PROC GOPTIONS AXIS;RUN; to see what your actual axis definitions are after each graph.
My Axis seems to be fine... I changed the code a bit when I posted here but used actual graphs, that might be causing the confusion...
Here are my sample tables... you may try to run it @ your end to see if you can replicate the same errors...
WORK.Table1
DAY_DATE VOLUMES HLD_T
13JUL2012 | 3117.08806 | 11.205 |
14JUL2012 | 49133.96603 | 14.795 |
15JUL2012 | 54229.88464 | 85.685 |
16JUL2012 | 5907.44181 | 89.259 |
17JUL2012 | 8073.71172 | 37.856 |
18JUL2012 | 7466.18194 | 17.815 |
19JUL2012 | 2962.38249 | 40.939 |
20JUL2012 | 91108.10337 | 41.663 |
21JUL2012 | 780.07229 | 46.739 |
22JUL2012 | 88595.75505 | 45.277 |
23JUL2012 | 1266.92058 | 42.247 |
24JUL2012 | 4870.97304 | 42.638 |
25JUL2012 | 1244.8857 | 47.485 |
26JUL2012 | 1041189.2767 | 46.082 |
work.table2
CATEGORY | DAY_DATE | VOLUME |
CAT A | 13-Jul-12 | 706311 |
CAT A | 14-Jul-12 | 426349 |
CAT A | 15-Jul-12 | 854943 |
CAT A | 16-Jul-12 | 627984 |
CAT A | 17-Jul-12 | 198392 |
CAT A | 18-Jul-12 | 784285 |
CAT A | 19-Jul-12 | 647874 |
CAT A | 20-Jul-12 | 531749 |
CAT A | 21-Jul-12 | 170458 |
CAT A | 22-Jul-12 | 224900 |
CAT A | 23-Jul-12 | 190787 |
CAT A | 24-Jul-12 | 685354 |
CAT A | 25-Jul-12 | 879807 |
CAT A | 26-Jul-12 | 554154 |
CAT B | 13-Jul-12 | 658663 |
CAT B | 14-Jul-12 | 495575 |
CAT B | 15-Jul-12 | 160814 |
CAT B | 16-Jul-12 | 312830 |
CAT B | 17-Jul-12 | 174802 |
CAT B | 18-Jul-12 | 850810 |
CAT B | 19-Jul-12 | 521259 |
CAT B | 20-Jul-12 | 2519 |
CAT B | 21-Jul-12 | 129043 |
CAT B | 22-Jul-12 | 831783 |
CAT B | 23-Jul-12 | 890345 |
CAT B | 24-Jul-12 | 819952 |
CAT B | 25-Jul-12 | 590249 |
CAT B | 26-Jul-12 | 161178 |
CAT C | 13-Jul-12 | 601218 |
CAT C | 14-Jul-12 | 504453 |
CAT C | 15-Jul-12 | 202749 |
CAT C | 16-Jul-12 | 989501 |
CAT C | 17-Jul-12 | 726660 |
CAT C | 18-Jul-12 | 311525 |
CAT C | 19-Jul-12 | 78606 |
CAT C | 20-Jul-12 | 674555 |
CAT C | 21-Jul-12 | 915889 |
CAT C | 22-Jul-12 | 876933 |
CAT C | 23-Jul-12 | 267730 |
CAT C | 24-Jul-12 | 859607 |
CAT C | 25-Jul-12 | 957563 |
CAT C | 26-Jul-12 | 500939 |
any update...?
Hi:
If you have an urgent or immediate need, your best resource is to open a track with Tech Support. Look for the links in the forum system that say "Submit a problem report", in order to open a track with Tech Support. (There should be a link at the bottom of the viewing page).
cynthia
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.