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! 🤗

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 474 views
  • 1 like
  • 2 in conversation