BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Bildog1
Calcite | Level 5

I submitted the following code below and the result was title1 always resolves to: 

 

^S={preimage="U:\Graphics and Templates\Logo Files\White PNGs (Use These!)\main-logo-v2-white-200x95.png"} 

 

Instead of the logo file located at: U:\Graphics and Templates\Logo Files\White PNGs (Use These!)\main-logo-v2-white-200x95.png

 

Here is submitted code:

 

goptions reset=all border cback=white htitle=12pt;

options nodate nonumber;
ods listing close;
ods escapechar="^";
ods noproctitle;

ods pdf file="E:\Demographics_201708.pdf" startpage=never gtitle;

 

/* Assign a color to each type */
pattern1 V=S c=vibg;
pattern2 v=s c=gray;
pattern3 v=s c=green;
pattern4 v=s c=day;
pattern5 v=s c=deoy;

 

title1 just=l '^S={preimage="U:\Graphics and Templates\Logo Files\White PNGs (Use These!)\main-logo-v2-white-200x95.png"}';
title2 j=c 'August 2017 Data' ;


proc gchart data=agepct;


format num comma12.0;
vbar agecat_c / discrete sumvar=num
subgroup=actcat
g100 nozero
type=percent inside=subpct width=20
outside=sum;
run;


quit;

ods pdf close;

 

I've looked at this several times and cannot see the issue.  I am using SAS 9.4 Windows TS Level 1M4.

1 ACCEPTED SOLUTION

Accepted Solutions
7 REPLIES 7
Cynthia_sas
SAS Super FREQ
Hi: I believe that if you want to use an image in the title you need for ODS to handle the title using the NOGTITLE option. The GTITLE option tells SAS/GRAPH to control the title and ODS ESCAPECHAR is not typically used by SAS/GRAPH for titles. With NOGTITLE, you tell ODS PDF (or your destination) to control the titles. That should work better for you.

cynthia
Bildog1
Calcite | Level 5

That gets me closer.  Now the text just=l is showing up on title1 instead of the image.  Any other thoughts?

Bildog1
Calcite | Level 5

This is the error message in the log for the title statement:

WARNING: The TITLE statement is ambiguous due to invalid options or unquoted text.

ballardw
Super User

@Bildog1 wrote:

This is the error message in the log for the title statement:

WARNING: The TITLE statement is ambiguous due to invalid options or unquoted text.


 

It wouldn't hurt to show the title statement from the log with that message. We can't be sure what was actually submitted without it.

Bildog1
Calcite | Level 5

In the first post the same title1 statement was submitted, the only difference was changing the line:

 

ods pdf file="E:\Demographics_201708.pdf" startpage=never gtitle; TO:

 

ods pdf file="E:\Demographics_201708.pdf" startpage=never nogtitle;

Bildog1
Calcite | Level 5

If this helps

 

 title1 just=l '^S={preimage="U:\AHP\Graphics and Templates\Logo Files\White PNGs (Use
2779! These!)\main-logo-v2-white-200x95.png"}';
WARNING: The TITLE statement is ambiguous due to invalid options or unquoted text.

 

2779 is the line in the log

ballardw
Super User

j=left j=l justify=left justify=l not just=l

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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