BookmarkSubscribeRSS Feed
FrankPoppe
Quartz | Level 8

 I am trying to use Proc Report to create an HTML table with as less ballast as possible, with the intention to use it within another HTML page. By using the CHTML destination and the NO_TOP_MATTER and NO_BOTTOM_MATTER options I got close. 

 

But there still are <p> ... </p> tags around the table (not really a problem), and there is <a name="IDX"> tag in front of that. 

 

And this is causing problems. The page using this HTML gets confused because there is no </A> tag. It assumes there must be such a tag after the table, and that makes the whole table act as a link (without a href attribute).

 

I am not sure if having an <A> tag without a closing </A> is actually allowed in HTML. But I am sure that in HTML5 the name= attribute is not supported. Anchors should be created with an id= attribute on the object itself (in this case the table object.

 

Is this somethings others have had problems with? Any work arounds? 

Can you consider this a bug?

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Should just be a matter of finding the tagset that is being used to create the output, and modifying that to remove the string you don't want.   Now in desktop SAS you could access tagsets via the Results window, right click on results and select templates, then navigate to it, the Excel base one starts like:

proc template;                                                                
   define tagset Tagsets.ExcelBase / store = SASUSER.TEMPLAT;                 
      notes                                                                   
         "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dne
xcl2k2/html/odc_xlsmlinss.asp";                                               
      mvar embedded_titles embedded_footers frozen_headers frozen_rowheaders  
         autofilter width_points width_fudge default_column_width formulas    
         convert_percentages orientation override_sheetname;                  
                                                                              
      define event changes;                                                   

Basically that defines everything which is written out using that tagsets, so you can just inherit and alter that.

FrankPoppe
Quartz | Level 8

Thanks for the reaction.

Yes, I know that I can create a tagset that changes this behaviour. But it seemed to me that this should not be needed. That was the background of my question.

 

And having an own tagset for this makes the whole governance of the application more complex.

Cynthia_sas
SAS Super FREQ
Hi:
CHTML is one of the older HTML destinations. you could try some other HTML destinations to see if you can find one that supplies the missing </A> tag. Possibilities are PHTML, HTML3 and HTML5 and if you use style=minimal, you should come very close to CHTML.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3 replies
  • 815 views
  • 0 likes
  • 3 in conversation