The SAS Output Delivery System and reporting techniques

html row ids

Reply
Contributor
Posts: 50

html row ids

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
SAS Super FREQ
Posts: 8,865

Re: html row ids

Posted in reply to BrunoSilva
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
Contributor
Posts: 50

Re: html row ids

Posted in reply to BrunoSilva
Thanks Smiley Very Happy
Ask a Question
Discussion stats
  • 2 replies
  • 119 views
  • 0 likes
  • 2 in conversation