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