ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
DmytroYermak
Lapis Lazuli | Level 10

Hi, is it possible put 'invisible' character elements in proc report?

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, ods escapechar tells SAS what character(s) to use to indicate an escape code, so you don't want ~w as the characters only the ~:

ods escapechar="~";

Note how I don't code all in uppercase.

 

Now I don;t know where your ~w is coming in, is it in the data, if so that change should work (and assuming w is a real code).  If not post some full code so can see.  Also, one option to remember on proc report is asis, which if you have spaces will show them, rather than trimming:

define var / style=(asis=on);

 

Ksharp
Super User
firstly, use
ods escapechar="~";

then  ~_  stands for a white blank .




DmytroYermak
Lapis Lazuli | Level 10
Thank you! I can review thoroughly a little bit later on, sorry for that.
Cynthia_sas
SAS Super FREQ

Hi, the ESCAPECHAR sequence of ESCAPECHAR+underscore is an older form of syntax that was first introduced in SAS 8.3 to insert a "non-breaking space" -- not necessarily the same as a "white space".

The newer syntax is
ESCAPECHAR+{NBSPACE 1}.

So if Escapechar is defined at ~, then instead of ~_ you would have
~{NBSPACE 1} as shown here: http://go.documentation.sas.com/?docsetId=odsug&docsetTarget=p11xia2ltavr8ln17srq8vn4rnqc.htm&docset...

cynthia

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 16306 views
  • 2 likes
  • 4 in conversation