BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

When I'm creating tables in Ms Word using SAS Add ins with results output set to SAS Reports, the less than sign (<) is displayed as <

How do I get it to be displaying < when using SAS Reports in Ms Word

Thank you. Message was edited by: Kurt
5 REPLIES 5
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
It's always useful to share SAS code and associated log when posting a problem / query. Based on the symptom you describe, check the SAS support website for discussion about the referenced term PROTECTSPECIALCHARACTERS= for this purpose, possibly.

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
i've done some reading on protectspecialcharacters and it seems like it only works when your template is a rtf format, i'm using sas report.
i'll keep on reading on protectspecialcharacters.
thank you
Cynthia_sas
SAS Super FREQ
Hi:
The PROTECTSPECIALCHARS style attribute is useful when you want to pass native HTML tags (like the <DIV> tag) or native RTF control strings (like \tab instruction) into your ODS output for the purpose of telling ODS -not- to turn on encoding for the < or the > or the \.

SASReport XML is not RTF or PDF output. Under normal circumstances, something like this in a title:
[pre]
title 'Report for Sales > 500';
[/pre]

--should display the greater than sign correctly in the title, without needing to use the PROTECTSPECIALCHARS attribute. On the other hand, if you wanted to do this (for some reason)
[pre]
title '<div><h1>My Really Big Title</h1></div>';
[/pre]
-- pass <div> and an <h1> tags to ODS HTML, then you would either need to set PROTECTSPECIALCHARS=OFF in the style template for the title or you'd have to use ODS ESCAPECHAR to use the style attribute for this title string only.

However, SASReport XML is designed to work in a number of different client applications, so the first TITLE statement ('Report for Sales > 500') should work in all client applications -- if it does not, then this is one reason to work with SAS Tech Support.

In addition, when you work with SASReport XML, in the various client applications, it makes a real difference whether you are using stored processes or not and which client application is receiving the stored process results. For example, if you had the second title statment (using HTML tags) in a stored process, I would only expect that <div> tag to work if the stored process results were HTML (in EG, Word, Excel or the Information Delivery Portal). I would NOT expect the second title statement to work in Web Report Studio or PowerPoint--because those client applications only receive SASReport XML.

I still recommend that you work with Tech Support on this issue. There are some HTML encoding issues and encoding functions that you can use when working with characters that could possibly have dual meaning, such as < and >. It might also be the case that someone incorrectly applied the HTMLENCODE function:
http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a001157104.htm
and did not remember to apply the HTMLDECODE function:
http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a001146073.htm

However, SASReport XML is XML and not HTML and Tech Support is your best resource in this matter.

cynthia
Cynthia_sas
SAS Super FREQ
Hi:
Although you can see the log from Stored Processes when using the SAS Add-in for Microsoft Office, normally most Add-in users have the log turned off. Otherwise, most tasks in the Add-in don't have code that the end user can easily cut and paste. I also don't think this is an Add-in issue that you can resolve easily. I believe this may either be a server issue or an issue with the SASReport XML. Does the same thing happen if you change the result type to HTML???

In any case, I would suggest that you contact Tech Support on this issue, as it will make a difference how the tables are being created -- whether from a Stored Process or a task/wizard. Also server settings or code settings may need to be checked and changed and Tech Support can help you with that. You might wish to have the SAS Administrator at your site contact Tech Support on this issue by filling out this form:
http://support.sas.com/ctx/supportform/createForm

cynthia
deleted_user
Not applicable
Hi

When working with HTML and RTF, the character is displayed properly, however SAS Reports is somewhat of a problem.

Thank you

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