BookmarkSubscribeRSS Feed
Fisher
Quartz | Level 8
My following code displays titles twice (above the graph and inside the graph):

ods pdf file='test.pdf';
title;
title2 'title2';
title4 'title4';
proc sgplot data=.MeanValue;
Xaxis label="Mean Score" values=(0 to 5 by 1);
yaxis label="Items" ;
hbar Item / response=Avg;
run;
quit;
ods pdf close;

I am not sure this is a graph question or an ODS question. Thanks for any help.
15 REPLIES 15
ArtC
Rhodochrosite | Level 12
I have been unable to duplicate the problem. Do you see the same behavior with just this code step and a fresh version of SAS?
Fisher
Quartz | Level 8
Thanks ArtC. To make sure my other options don't have effect on this codes, I shut down and restarted my SAS (v.9.2).
But after I submit the code, I still got the PDF file that have duplicate titles. I mean on the top of the page, title2, title 4 and title 5 display and, within the graph image, the three titles also show up.
Cynthia_sas
SAS Super FREQ
Hi:
I agree with ArtC. I cannot duplicate this issue with the code below. If the problem persists after you restart SAS, then you should open a track with Tech Support.

cynthia
[pre]
options nodate nonumber;
title; footnote;

ods pdf file='c:\temp\test_title.pdf';

title;
title2 'title2';
title4 'title4';
proc sgplot data=sashelp.class;
hbar age / response=weight stat=mean;
run;

ods pdf close;
[/pre]
Fisher
Quartz | Level 8
Cynthia, I ran your code after I restarted my SAS. Unfortunately, I still got the same problem. 😞

Message was edited by: Fisher
Fisher
Quartz | Level 8
Can I send the PDF file created by your code to you by email?
Fisher
Quartz | Level 8
Finally, SAS technical support provided the reason and suggested a workaround to this problem. Anyone suffered like me can go to here to avoid wasting more time:

http://support.sas.com/kb/34/600.html

Thanks, SAS tech support team.
Cynthia_sas
SAS Super FREQ
Ah, that does explain it. I was testing in SAS 9.2 M2, which is why the problem did not occur in my test. Tech Support is, indeed, wonderful.

BTW, if you use this search string
duplicate titles PDF SGPLOT
in the search facility SUPPORT.SAS.com, that TS Note is the first "hit".

cynthia
DrAbhijeetSafai
Lapis Lazuli | Level 10

Thanks. I am happy to see that there are solutions to this problem because I am facing the same problem now. I cannot use RTF because use of PDF is the requirement of the work. I will try to see if I can use other ways to solve the issue. I am happy to find the others also have faced this issue and there might not be something wrong in the code. Thanks for this discussion. 

 

- Dr. Abhijeet Safai

Dr. Abhijeet Safai
Certified Base and Clinical SAS Programmer
Associate Data Analyst
Actu-Real
Cynthia_sas
SAS Super FREQ
Hi:
The original issue as reported in 2010 was resolved by using a different version of SAS. The problem was reported in SAS 9.2 M1 version and I tested in SAS 9.2 M2 back in 2010, and did not have any issues. The current version of SAS is SAS 9.4 and I just tested the code again -- the code I posted on 12/21/2010 -- using 9.4M7 version and did not have any duplicate titles in the PDF file.
If you are using a current version of SAS, 9.4 M6 or 9.4 M7 and the original problem has surfaced for you, it would be a good idea to work with Tech Support. Also, adding your new question to a 12 year old posting isn't very productive. Most folks won't wade through all the old postings to find the new question. It's better to make a new posting and refer back to the original post.
Cynthia
DrAbhijeetSafai
Lapis Lazuli | Level 10

Dear Madam,

 

Greetings!

 

I think that the source of issue is from the data itself. Because headers are not getting repeated for other reports but only for this one report coming from one dataset. It is a PDF in which I have collected multiple reports (about 30) below each other. It is a task related to patient profiles. 

 

As guided by you, I will surely create a new post and will refer back to this post in that post if the issue persists and if it is related to SAS. At the moment, I think that it is a data issue and hence it needs to be resolved at the data level. Thanks a lot for the quick response. 

 

Thanking you,

Yours sincerely,

 

- Dr. Abhijeet Safai

Dr. Abhijeet Safai
Certified Base and Clinical SAS Programmer
Associate Data Analyst
Actu-Real
DrAbhijeetSafai
Lapis Lazuli | Level 10

Dear All,

 

Greetings!

 

I think now I know what the issue was as it is solved. The issue was that I was defining labels again when some columns appear twice in the report. I understood that the labels of columns need not be defined twice in the define statement after forward slash. That was the issue. Sharing here because it has got solved.

 

Thanking you,

Yours sincerely,

 

- Dr. Abhijeet Safai

Dr. Abhijeet Safai
Certified Base and Clinical SAS Programmer
Associate Data Analyst
Actu-Real
scolitti1
Calcite | Level 5
Hi did you ever find a solution? I am running into the same problem
ballardw
Super User

@scolitti1 wrote:
Hi did you ever find a solution? I am running into the same problem

@scolitti1 You want to start your own thread, provide example data in the form of data step code and the ODS destination information and the procedure that duplicates your problem.

You should also provide the version of SAS you are running.

 

You are asking in a thread that is more than 12 years old, has had 2 major releases, 9.3 and 9.4 and incremental releases of SAS since then. So much of this thread is not applicable unless you are running an earlier version of SAS.

 

Ksharp
Super User
/*try NOGTITLE option*/
ods pdf file='c:\temp\test.pdf' nogtitle ;
title;
title2 'title2';
title4 'title4';
proc sgplot data=sashelp.class;
hbar age / response=weight;
run;
ods pdf close;

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
  • 15 replies
  • 5672 views
  • 11 likes
  • 7 in conversation