The SAS Output Delivery System and reporting techniques

Missing Title in ODS Output for proc sgpanel using SAS 9.2

Reply
Occasional Contributor
Posts: 5

Missing Title in ODS Output for proc sgpanel using SAS 9.2

Dear all,

I have a problem in generation ODS graphics out of proc sgpanel. Everything is working except the generation of the title.

Below a general example. It would be nice if you can give my an advice how i can solve this problem. Gtitle and nogtitle are not working as expected or I use them wrongly.

graphics on /reset=all  imagename="test";

html path="&path." (url=none)

image_dpi=200  gtitle ;

proc sgpanel data=sashelp.heart noautolegend;

title "Cholesterol Distribution in Heart Study";

panelby sex;

histogram cholesterol;

density cholesterol;

;

Many thanks in advance.

Best regards,

Martin

Grand Advisor
Posts: 10,210

Re: Missing Title in ODS Output for proc sgpanel using SAS 9.2

Please describe the issue in more detail. Is the title not appearing at all? In the wrong location?

Possibly no output at all?

With path you may want to specify body="HeartChart.Html" on the ods destination.

also be aware that this forum does bad things to code copied directly from the SAS editor and pasted when using Internet Explorer. I suspect that as a minimum you lost two ODS and a run; in the pasted text.

Occasional Contributor
Posts: 5

Re: Missing Title in ODS Output for proc sgpanel using SAS 9.2

Yes, the title is not appearing at all but I recieve output.

When I use proc sgplot it is working but not with proc sgpanel.

Occasional Contributor
Posts: 5

Re: Missing Title in ODS Output for proc sgpanel using SAS 9.2

Many thanks @ballardw, your tipp to specify body="HeartChart.Html" on the ods destination works.

best,

Martin

New Contributor
Posts: 4

Re: Missing Title in ODS Output for proc sgpanel using SAS 9.2

Just to confirm, you don't see the title anywhere: in the graphical image (GTITLE) or outside the graphical image (NOGTITLE)?

Occasional Contributor
Posts: 5

Re: Missing Title in ODS Output for proc sgpanel using SAS 9.2

Yes exactly, I do not see the title anywhere.

SAS Super FREQ
Posts: 8,718

Re: Missing Title in ODS Output for proc sgpanel using SAS 9.2

Hi:

  Your code got garbled when you posted it. When I run this code:

ods graphics on /reset=all  imagename="test";

     

ods html path="c:\temp" (url=none) file='test_title_GT.html'

         image_dpi=200  gtitle ;

   

proc sgpanel data=sashelp.heart noautolegend;

  title "1) Cholesterol Distribution in Heart Study";

  panelby sex;

  histogram cholesterol;

  density cholesterol;

run;

ods html close;

  

ods html path="c:\temp" (url=none) file='test_title_NOGT.html'

         image_dpi=200  nogtitle ;

   

proc sgpanel data=sashelp.heart noautolegend;

  title "2) Cholesterol Distribution in Heart Study";

  panelby sex;

  histogram cholesterol;

  density cholesterol;

run;

ods html close;

;

  I get these results -- with the title visible. Created in SAS 9.4. However, in the #1 code output, the title is INSIDE the "box/frame" of the image because of the GTITLE option.

gt.png

  Changing the GTITLE to NOGTITLE results in this -- notice how the title is now OUTSIDE the box of the image and in a slightly bigger font and in the color used for the HTML default style. BTW, if you open #2 OUTSIDE of a browser, then you won't see the title in the image because the title "belongs" to ODS HTML output.

nog.png

  If you run the code that I posted and do NOT get these results, then your best resource is to open a track with Tech Support.

Cynthia

Ask a Question
Discussion stats
  • 6 replies
  • 852 views
  • 0 likes
  • 4 in conversation