Your SAS programs, embedded in web apps and elsewhere

ods tagsets.htmlpanel doesn’t work but no error message

Accepted Solution Solved
Reply
Super Contributor
Posts: 497
Accepted Solution

ods tagsets.htmlpanel doesn’t work but no error message

I’ve tried every permutation I can find on SAS help sites on ODS tagsets.htmlpanel to display sgplot graphs side by side.  I am using a stored procedure that I would like to view in Information Delivery Porta 4.2 or Enterprise Guide 5.1 with SAS 9.2.  The most basic code block I found is:

ODS Listing close;

goptions  dev=gif xpixels=320 ypixels=240;

ods tagsets.htmlpanel NOGTITLE path = "/u01/tempwrs/" file ="graph2.htm"

options(panelcolumns='3');

                                   

ods tagsets.htmlpanel event = panel(start);

/*three sgplot graphs*/

ods tagsets.htmlpanel event = panel(finish);

The graphs display without error, but not side by side.  The log shows that the panel was processed.  See log text below:

================= Automatic Panel Start

NOTE: There were 53383 observations read from the data set WORK.DATA2.

      WHERE (census_period='2') and (term='Fall') and (academic_period>='201000');

NOTE: PROCEDURE SGPLOT used (Total process time):

      real time           0.16 seconds

      cpu time            0.12 seconds

     

NOTE: There were 32527 observations read from the data set WORK.DATA2.

      WHERE (census_period='2') and (term='Fall') and (academic_period>='201000') and (Degree_level='Baccalaureate');

NOTE: PROCEDURE SGPLOT used (Total process time):

      real time           0.21 seconds

      cpu time            0.14 seconds

     

NOTE: There were 20856 observations read from the data set WORK.DATA2.

      WHERE (census_period='2') and (term='Fall') and (academic_period>='201000') and (Degree_level not = 'Baccalaureate');

================= Automatic Panel Finish

I format the page earlier with ODS HTML statements which I tried removing a few times.

%LET _ODSDEST=HTML;

%LET _ODSOPTIONS=gtitle gfootnote style=normal;

My guess is that somehow the ods tagsets.htmlpanel is conflicting with code I have earlier that references ods.  Could you provide insight as to why there is no error message or altered display?


Accepted Solutions
Solution
‎12-04-2014 10:56 AM
Super Contributor
Posts: 497

Re: ods tagsets.htmlpanel doesn’t work but no error message

Posted in reply to DavidPhillips2

Must go outside of %Begin and %End.  I can now see graphs side by side.

%LET _ODSDEST=Tagsets.HTMLPANEL;

%LET _ODSOPTIONS=gtitle gfootnote options(panelcolumns='3');


Code Block

%LET _ODSDEST=Tagsets.HTMLPANEL;

  %LET _ODSOPTIONS=gtitle gfootnote options(panelcolumns='3');

  %Stpbegin;

  ods tagsets.htmlpanel event = panel(start);

  proc sgplot data=enrollment;       

vline ACADEMIC_PERIOD_DESC /response=STUDENTS_ENROLLED stat=sum markers;

  run;  Quit;

  proc sgplot data=enrollment;       

vline ACADEMIC_PERIOD_DESC /response=STUDENTS_ENROLLED stat=sum markers;

  run;  Quit;

  proc sgplot data=enrollment;       

vline ACADEMIC_PERIOD_DESC /response=STUDENTS_ENROLLED stat=sum markers;

  run;  Quit;

  ods tagsets.htmlpanel event = panel(finish);

  %Stpend;

View solution in original post


All Replies
Occasional Contributor
Posts: 7

Re: ods tagsets.htmlpanel doesn’t work but no error message

Posted in reply to DavidPhillips2

Hi David,

In order to see the SGPlot Graph's side by side, you need to establish rows/columns within your tagsets.htmlpanel panel(start) event, here is an example I use almost everyday for generic dashboard users (very high level data), this is a simple layout for a url display port showing graphs, 1 panel, 2 rows with various columns on each row.  I also wrap this so it can be used in a stored process.  Hope this helps

%inc "Your Assigned Drive Letter:\SAS\EBIEDIEG\Lev1\SASApp\htmlpanl.tpl";

%let _odsdest=tagsets.htmlpanel;

*ProcessBody;

filename odsout 'c:\temp';

ods tagsets.htmlpanel Path = odsout Body="HtmlPanel.html" style=styles.Sasweb

options(embedded_titles='yes');

%STPBEGIN;

ods tagsets.htmlpanel event=panel(start);

ods tagsets.htmlpanel event=row_panel(start);

ods tagsets.htmlpanel event=column_panel(start);

ods tagsets.htmlpanel event=column_panel(finish);

ods tagsets.htmlpanel event=row_panel(finish);

ods tagsets.htmlpanel event=panel(finish);

ods tagsets.htmlpanel event=panel(start);

ods tagsets.htmlpanel event=row_panel(start);

ods tagsets.htmlpanel event=column_panel(start);

ods tagsets.htmlpanel event=column_panel(finish);

ods tagsets.htmlpanel event=column_panel(start);

ods tagsets.htmlpanel event=column_panel(finish);

ods tagsets.htmlpanel event=row_panel(finish);

ods tagsets.htmlpanel event=panel(finish);

%STPEND;

ods _all_ close;

Solution
‎12-04-2014 10:56 AM
Super Contributor
Posts: 497

Re: ods tagsets.htmlpanel doesn’t work but no error message

Posted in reply to DavidPhillips2

Must go outside of %Begin and %End.  I can now see graphs side by side.

%LET _ODSDEST=Tagsets.HTMLPANEL;

%LET _ODSOPTIONS=gtitle gfootnote options(panelcolumns='3');


Code Block

%LET _ODSDEST=Tagsets.HTMLPANEL;

  %LET _ODSOPTIONS=gtitle gfootnote options(panelcolumns='3');

  %Stpbegin;

  ods tagsets.htmlpanel event = panel(start);

  proc sgplot data=enrollment;       

vline ACADEMIC_PERIOD_DESC /response=STUDENTS_ENROLLED stat=sum markers;

  run;  Quit;

  proc sgplot data=enrollment;       

vline ACADEMIC_PERIOD_DESC /response=STUDENTS_ENROLLED stat=sum markers;

  run;  Quit;

  proc sgplot data=enrollment;       

vline ACADEMIC_PERIOD_DESC /response=STUDENTS_ENROLLED stat=sum markers;

  run;  Quit;

  ods tagsets.htmlpanel event = panel(finish);

  %Stpend;

Occasional Contributor
Posts: 7

Re: ods tagsets.htmlpanel doesn’t work but no error message

Posted in reply to DavidPhillips2

Hi DavidPhillips2,

So did my code lead you to this?  You are correct that if you want one row, going west to east of charts, the options(panelcolumns='3') works, however, if you want multiple rows and multiple columns, not always equal on both axis, then creating panels, columns and rows is the best way to go.

I suppose you could have multiple %Let _ODSOPTIONS statements, if you need generic rows, it would work fine.

Glad you found a resolution..

Regards

Jonathan

Super Contributor
Posts: 497

Re: ods tagsets.htmlpanel doesn’t work but no error message

Jonathan,


You helped however the credit should really be given to a SAS representative that reached out to me via email.  Thanks for your advice on this.


Best Wishes,


David

Occasional Contributor
Posts: 7

Re: ods tagsets.htmlpanel doesn’t work but no error message

Posted in reply to DavidPhillips2

HI DavidPhillips2,

I also forgot to ask, did you question get answered via my assistance?

Thanks

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 693 views
  • 0 likes
  • 2 in conversation