BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
SAS_Question
Quartz | Level 8

Have:


%LET WGHTML=P:\TEMP;
%LET WGINDEX=index.html;

ods html5 path="&WGHTML.\" (no_top_matter no_bottom_matter)
	style=HTMLBlue
	file="&WGINDEX."
	(title="MyTitle")
;

/*
style(report)=[tagattr='id="unique_id"']
is not outputting a table ID in the html...how come??!
*/
proc report data=sashelp.cars nowd style(report)=[tagattr='id="unique_id"'];
column Make Model Cylinders;
define Make / group;
compute after Make;
	line ' ';
endcomp;
run;

ods html5 close;

No "unique_id" id output inside HTML page: 

not working.PNG

 

 

What I want is this: 

I want to add an ID for my proc report table output, so I can add more css layouts etc.

So the ID comes here: 

Want.PNG

 

My question is: 

-How can I add a unique table ID to the ouput in the SAS ODS/Proc Report step? 

I tried as you can see in the SAS-code to do it with 

style(report)=[tagattr='id="unique_id"']

but no luck... 

what am I missing here? Please any help? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  Usually, I only use TAGATTR with the  ODS destinations for EXCEL. The ODS HTML destinations have an attribute called HTMLID that you can use in a simple style override, as shown below. It may not always go into the place you want it to go. I wasn't sure it would work with ODS HTML5, but in this case, it seems to have worked -- I used "wombat" as the attribute value for HTMLID so I could find it easily in my search:

Cynthia_sas_1-1670619466646.png

 

  Hope this helps,

Cynthia

Cynthia_sas_0-1670619397401.png

 

View solution in original post

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

  Usually, I only use TAGATTR with the  ODS destinations for EXCEL. The ODS HTML destinations have an attribute called HTMLID that you can use in a simple style override, as shown below. It may not always go into the place you want it to go. I wasn't sure it would work with ODS HTML5, but in this case, it seems to have worked -- I used "wombat" as the attribute value for HTMLID so I could find it easily in my search:

Cynthia_sas_1-1670619466646.png

 

  Hope this helps,

Cynthia

Cynthia_sas_0-1670619397401.png

 

SAS_Question
Quartz | Level 8

Thank you @Cynthia_sas !!!...

Exactly what I was looking for! 🤗

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 353 views
  • 1 like
  • 2 in conversation