BookmarkSubscribeRSS Feed
ccc143
Calcite | Level 5

When I include the options for embedding titles, the tables aren't truncated.  But I don't want to keep the titles embedded.  Is there another way to prevent my tables from being truncated?

Thanks!!

data testdata;

input year month var1 var2 var3;

datalines;

2005 5 65 4 5

2001 8 84 4 6

1984 6 42 3 4

2008 6 48 5 4

2007 5 86 5 2

2003 6 98 2 6

2002 3 64 2 3

2006 4 68 4 6

1998 4 34 2 4

1999 7 54 3 4

2004 6 85 2 2

2002 8 98 4 8

2006 9 75 4 3

;

run;

ods listing close;

ods reset=all;

ods tagsets.htmlpanel file="h:\\temp\testdata.html"

style=meadow

gpath="h:\\temp\testdata.html";

/*Options(embedded_titles='yes' embed_titles_once='yes'); */

title  j=l h=5 'Testdata Summary' ; 

ods tagsets.htmlpanel event=panel (start);

ods tagsets.htmlpanel event=row_panel (start);

ods tagsets.htmlpanel event=column_panel (start);

goptions hsize=8 vsize=6;

proc tabulate data=testdata;

class month year var3;

var var1;

table year='var1', month=' '*var3;

keylabel sum=' ';

run;

ods tagsets.htmlpanel event=column_panel (finish);

ods tagsets.htmlpanel event=column_panel (start);

goptions hsize=8 vsize=6;

proc tabulate data=testdata;

class month year var3;

var var2;

table year='var2', month=' '*var3;

keylabel sum=' ';

run;

ods tagsets.htmlpanel event=panel (finish);

ods tagsets.htmlpanel event=row_panel (finish);

ods tagsets.htmlpanel event=column_panel (finish);

ods tagsets.htmlpanel close;

2 REPLIES 2
Tom
Super User Tom
Super User

Not sure what you mean by truncation.  I do not see any difference when running your code with or without the embedded titles.

Cynthia_sas
SAS Super FREQ

Hi:

  I agree with Tom. I'm not sure what you mean by "truncation". The tables look the same to me whether I use embedded_titles or not. The first TITLE line is different. I've changed the code a bit to have TITLE1 the same on both tables and TITLE2 different on both tables. I do not think EMBED_TITLES_ONCE is a valid suboption for the HTMLPANEL tagset -- when I use the DOC='HELP' suboption, I do not see EMBED_TITLES_ONCE in the list of valid suboptions.

  Also, you only need a GPATH statement if you have SAS/GRAPH (such as GCHART/GPLOT) procedures in your code -- which you don't. HSIZE and VSIZE will have no impact on PROC TABULATE. This Tech Support sample shows how, for example, to combine GCHART output with other procedure output:

http://support.sas.com/kb/38/066.html

and this is the site with more examples of using HTMLPANEL:

http://support.sas.com/rnd/base/ods/odsmarkup/htmlpanel.html  Note that the GOPTIONS are only shown when the HTML files will contain output created by SAS/GRAPH.

  In the attached screen shot, I show the behavior with and without the embedded_titles suboption. In the first screenshot, there is only 1 title in effect and that title is left justified on the HTML page. In the second screenshot, I changed the code to have two titles for each table and you can see that the TITLE1 is left justified above each table and, as we expect, TITLE2 is center justified above each table. I also changed your code to get rid of the KEYLABEL statement, since you never generate the SUM statistic in your TABLE because only the CLASS variables are used.

  If you can explain more about what you mean by "truncation"???? (I do note that you have a VAR statement for VAR1 and VAR2 in your TABULATE code, but do not use either variable in your TABLE statement.)

cynthia


one_title_no_embed_partial_code.jpgtwo_title_partial_code.jpgtwo_title_embed.jpgone_title_no_embed.jpg

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 954 views
  • 0 likes
  • 3 in conversation