BookmarkSubscribeRSS Feed
mmea
Quartz | Level 8

Hi.

is it possible to make a fancy pdf table like this in SAS?

 

 

3 REPLIES 3
andreas_lds
Jade | Level 19

Should be possible by using RWI.

mkeintz
PROC Star

I had no idea of what RWI was, so google of "sas rwi" tells me it's Report Writing Interface.

 

I know nothing about it, but I'm curious enough to take a look at these SGF papers later

  1. The Incredible, Accessible Report: Creating PDF Reports that Meet Compliance Standards in SAS® 9.4M6
  2. Using the ODS Report Writing Interface to Streamline Publication of Existing Reports with Complex Ta... 

 

And the relevant SAS Documentation can be found in the neighborhood of
    Working with the Report Writing Interface

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
ballardw
Super User

With some example data in the form of a data step and the rules involved in showing a check mark, X or Exclamation mark is suspect this is doable in Proc Report with a couple of formats.

 

A very brief example:

Proc format;
value check
1 =  '(*ESC*){unicode "2713"x}'
2 = 'X'
3 = '!'
;
Value tcolor
1 =  'green'
2 = 'red'
3 = 'gold'
;
run;

data example;
   input text $ value;
datalines;
Something 1
Another   2
Else      3
;

proc report data=example ;
   columns text value;
   define text /display;
   define value/ display style=[color=tcolor. font_size=12pt] format=check.;
run;

Trick is finding a unicode symbol you like and the code for it. Then have values that a format can associate with. Note the use of a different font to modify the TEXT color. Yet another format could point to a specific Font, font_size, background color or even change border colors/width for cells. Just need to know the ODS Style element to use in the Style=[ ].

 

Your basic table layout looks like a modification of one of the Journal styles would work which would be referenced on the ODS PDF statement. If you don't actually need the lines in the body then maybe Journal will suit.

 

Proc Report has a number of features to allow adding text before/ after groups of values without any data and much more description of rules involved I'll just say there are lots of Proc Report SAS papers, presentation, blog posts and question/answers on this forum.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 707 views
  • 1 like
  • 4 in conversation