creating the perfect table using ods to pdf in sas 9.4®

13
Elizabeth Dennis, EMB Statistical Solutions Maddy Dennis, Pharmapace PharmaSUG 2015 Paper #QT07

Upload: terry-erisman

Post on 17-Aug-2015

70 views

Category:

Health & Medicine


6 download

TRANSCRIPT

Page 1: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

Elizabeth Dennis, EMB Statistical SolutionsMaddy Dennis, Pharmapace

PharmaSUG 2015Paper #QT07

Page 2: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

Converting RTF output to PDF output results in unwanted format changes

Using Proc Report code developed for ODS to RTF on ODS to PDF results in unwanted format changes

Best results come from ODS to PDF

2

Page 3: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

3

Page 4: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

The paper contains a Proc Template example which meets the FDA requirements for version of Adobe, fonts, margins, etc.

The paper contains an ODS to PDF statement which meets the FDA requirements for page orientation, bookmarks, navigation tab, etc.

4

Page 5: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

5

Page 6: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

Unicode symbols work as expected

A helpful table of all possible unicode symbols can be found on wikipedia

title5 j=c "Subjects ~{unicode 2265}50 Years of Age";

6

Page 7: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

The bottom border of the cell must be drawn to underline the spanning text

Column ("~S={borderbottomcolor=black borderbottomwidth=.5} Cycle 1 Treatment" col1-col3);

7

Page 8: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

Printing a line as the first footnote which spans the entire table layout

footnote "~{style [outputwidth=100% bordertopcolor=black Bordertopwidth=.1pt]}";

8

Page 9: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

Some exist as unicodes, so that is an option ~{super} and ~{sub} work, but the result is

abnormally small The best results come from offsetting the text,

slightly above or below the line

col1='Age~-12y~{style[font_size=7pt]a}';

col1='t~7y~{style[font_size=7pt]max}';

9

Page 10: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

If a categorical cell has a count of zero, then zero should print with no percentage The zero should align with other counts When both categorical and continuous data

are on one table, decimals should still be aligned

These can all be achieved using 2 columns, one for counts or descriptive statistics, and one for percentages

The template uses (cellpadding=0) so the 2 columns appear as one continuous column

10

Page 11: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

define col2/ display "Drug\(N=" style(header)=[just=right] style(column)=[just=d cellwidth=8% ];

define col3/ display "~{nbspace1}A\&n1)" style(header)=[just=left] style(column)=[just=d cellwidth=8% rightmargin=.3in];

11

Page 12: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

Adding blank spaces

col1=‘~_ ~_ ~_ ~_Males’;col1=‘~{nbspace 4}Males’;

Adding blank lines

col2=AESTDTC || ‘/~n || AEENDTC ;col2=AESTDTC || ‘/~{newline 1}’|| AEENDTC;

12

Page 13: Creating the Perfect Table Using ODS to PDF in SAS 9.4®

Name: Elizabeth DennisOrganization: EMB Statistical Solutions LLCCity, State: Overland Park, KSE-mail: [email protected]

Name: Maddy DennisOrganization: PharmapaceCity, State: San Diego, CAE-mail: [email protected]

13