BookmarkSubscribeRSS Feed
rkumar23
Calcite | Level 5

You guys been awesome in helping me ...So here's another one 🙂

I am looking if could have TABS or DRILL Down option with the ODS HTML  ...Specially since i have following as a code:

data x ;

set  y;

ods trace on;                                          

ods noproctitle;                                       

ods listing close ;                                    

ods html                                           

    path=datasetname                                     

    Base="//xx/MVSDS/"         

    body="&odsmem"                                     

    record_seperator=none                              

    style=barrettsblue                                 

    newfile=page;                                     

proc report data=x ;

proc summary data=x ;

proc freq data=x;

ods html close;

run;

Now with this the Body members are created for each Proc statement and that's not fitting with my requirement....I was looking if I could have Proc Report as a Main output then at the footnote I have option to drill down to proc summary and proc freq so i tried with the HREF option as below :-

data x ;

set  y;

ods trace on;                                          

ods noproctitle;                                       

ods listing close ;                                    

ods html                                           

    path=datasetname                                     

    Base="//xx/MVSDS/"         

    body="&odsmem"                                     

    record_seperator=none                              

    style=barrettsblue                                 

    newfile=page;                                     

proc report data=x ;

footnote  <A HREF='XXXXXX'   </a> ;  

proc summary data=x ;

  footnote  <A HREF='XXXXXX'   </a> ; 

proc freq data=x;

footnote  <A HREF='XXXXXX'   </a> ; 

ods html close;

run;

However I also get message of mismatch quotes or missing quotes for the dataset name in the HREF like it resolve to

https://x/MVSDS/Y.SHR.HTML(X)    ====which is without quote 

There's another error i found where it says HREF number of characters exceeded if i put the complete address for the Webaddress....

Could somebody point me to good example of either having webtabs with the ODS HTML or having HREF option with the lengthy and quoted webaddress...thanks for your help....

Again with this I thankyou specially Cynthia who been really good with the tricks provided... 

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, your footnote statement is throwing up an error because you need quotes all the way round it, e.g.:

footnote "<a href='XXXXX' </a>";

Length is likely to be an issue with footnotes as there is a maximum it can handle i.e. imagine a physical page having only a certain amount of space for footnotes.

I would suggest going to a website which has these "webtabs" and viewing the source code therein (right click/view source) or save the page and open in a html editor.  I would suggest that, and not tested this, that it should be straight forward in setting a bit of code in a data step between output procs, e.g.

data tabcode;

     code="<htab start ref='ABC'>"; output;

     code="<title>A Title</title>"; output;

     code="</htab>"; output;

run;

proc print data=tabcode nobs;

run;

proc report data=x;

run;

data tabcode;

     code="<htab start ref='BCD'>"; output;

     code="<title>A Title Two</title>"; output;

     code="</htab>"; output;

run;

proc print data=tabcode nobs;

run;

proc summary data=x;

run;

Etc.

You can pretty much build any kind of webpage that way as long as you know the HTML for it.

Ksharp
Super User

How about this :

ods listing close;
ods escapechar='~';
ods html style=default path="c:\temp\" (url=none) body='ch8_5_3b.html';
footnote1 '~S={url="ch8_5_3b.html#PROC MEANS"} PROC MEANS';
footnote2 '~S={url="ch8_5_3b.html#PROC FREQ"} PROC FREQ';

proc report data=sashelp.prdsale
(where=(prodtype='OFFICE'))
nowd;
column region product,actual;
define region / group ;
define product / across;
define actual / analysis sum;
rbreak after / summarize;
run;
ods html anchor='PROC MEANS';
proc means data=sashelp.class n mean;
class sex;
var age;
run;
ods html anchor='PROC FREQ';
proc freq data=sashelp.class ;
tables sex*age;
run;
ods html close;
ods listing close;

Xia Keshan

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