BookmarkSubscribeRSS Feed
BrunoSilva
Quartz | Level 8
Hi there,

I would like to know if is possible to add the attribute ID for each TR tag on a HTML table produced by the proc report.

I would like to get something like this with proc report or proc print

....
....



I already have a table with ID for each column.

ods listing close;
ods html file='teste.html' style=fancyPrinter;

proc report data=sashelp.class nowd;

column name sex age height;

define name / display
style(COLUMN) = {tagattr='id="1"'};
define sex / display
style(COLUMN) = {tagattr='id="2"'};
define age / display
style(COLUMN) = {tagattr='id="3"'};
define height / display
style(COLUMN) = {tagattr='id="4"'};
run;

ods html close;



Thanks
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi,
I do not believe there is a way to "touch" the <tr> -- at least -inside- PROC REPORT syntax. That's because the <tr> tag is generated by the beginning of the row of data being sent to ODS. And, since the beginning of the row event in ODS -only- generates the <tr> tag, there are no hooks to that event inside PROC REPORT.

You can probably modify or create your own HTML tagset using PROC TEMPLATE for tagset templates, in order to put extra text into the <tr> -- because it is the TAGSET template that handles the row event. And, also, if you want to create a counter to put into the rows, then you'd need to get into the details of TAGSET template and event processing.

If you do not have experience with Proc Template for TAGSET templates, you may with to contact Tech Support for more help with this question.

cynthia
BrunoSilva
Quartz | Level 8
Thanks 😄

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 722 views
  • 0 likes
  • 2 in conversation