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

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?

1 ACCEPTED SOLUTION

Accepted Solutions
DavidPhillips2
Rhodochrosite | Level 12

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

5 REPLIES 5
cociotho
Calcite | Level 5

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;

DavidPhillips2
Rhodochrosite | Level 12

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;

cociotho
Calcite | Level 5

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

DavidPhillips2
Rhodochrosite | Level 12

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

cociotho
Calcite | Level 5

HI DavidPhillips2,

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

Thanks

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!

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.

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
  • 5 replies
  • 1423 views
  • 0 likes
  • 2 in conversation