<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ODS for pdf report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295223#M16737</link>
    <description>&lt;P&gt;I have a code and got the report.&lt;/P&gt;&lt;P&gt;For the first figure I used 'ods pdf file=XXX ' to output. For the second figure, I got from listing output. You can see the formats of two figures are completely different.&lt;/P&gt;&lt;P&gt;I want to get the second figure with "ods pdf file=" . My question is how I can reach it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My second question is when I use the fllowing code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;footnote1 "Created by %sysfunc(getoption(sysin)) on"&amp;nbsp;" &amp;amp;sysdate9..";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the&amp;nbsp;&lt;SPAN&gt;%sysfunc(getoption(sysin)) does not work. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4768i89CD9B5EF4998800/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="1.jpg" title="1.jpg" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4770iF4DC3A8F6219D5FA/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="2.jpg" title="2.jpg" /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2016 15:29:29 GMT</pubDate>
    <dc:creator>Niugg2010</dc:creator>
    <dc:date>2016-08-30T15:29:29Z</dc:date>
    <item>
      <title>ODS for pdf report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295223#M16737</link>
      <description>&lt;P&gt;I have a code and got the report.&lt;/P&gt;&lt;P&gt;For the first figure I used 'ods pdf file=XXX ' to output. For the second figure, I got from listing output. You can see the formats of two figures are completely different.&lt;/P&gt;&lt;P&gt;I want to get the second figure with "ods pdf file=" . My question is how I can reach it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My second question is when I use the fllowing code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;footnote1 "Created by %sysfunc(getoption(sysin)) on"&amp;nbsp;" &amp;amp;sysdate9..";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the&amp;nbsp;&lt;SPAN&gt;%sysfunc(getoption(sysin)) does not work. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4768i89CD9B5EF4998800/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="1.jpg" title="1.jpg" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4770iF4DC3A8F6219D5FA/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="2.jpg" title="2.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 15:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295223#M16737</guid>
      <dc:creator>Niugg2010</dc:creator>
      <dc:date>2016-08-30T15:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: ODS for pdf report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295237#M16739</link>
      <description>&lt;P&gt;Please display your code, of both reports, to better understanding of your question.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 16:06:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295237#M16739</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-08-30T16:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: ODS for pdf report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295261#M16741</link>
      <description>&lt;P&gt;data demog;&lt;BR /&gt;label subjid = "Subject Number"&lt;BR /&gt;trt = "Treatment"&lt;BR /&gt;gender = "Gender"&lt;BR /&gt;race = "Race"&lt;BR /&gt;age = "Age";&lt;BR /&gt;input subjid trt gender race age @@;&lt;BR /&gt;datalines;&lt;BR /&gt;101 0 1 3 37 301 0 1 1 70 501 0 1 2 33 601 0 1 1 50 701 1 1 1 60&lt;BR /&gt;102 1 2 1 65 302 0 1 2 55 502 1 2 1 44 602 0 2 2 30 702 0 1 1 28&lt;BR /&gt;103 1 1 2 32 303 1 1 1 65 503 1 1 1 64 603 1 2 1 33 703 1 1 2 44&lt;BR /&gt;104 0 2 1 23 304 0 1 1 45 504 0 1 3 56 604 0 1 1 65 704 0 2 1 66&lt;BR /&gt;105 1 1 3 44 305 1 1 1 36 505 1 1 2 73 605 1 2 1 57 705 1 1 2 46&lt;BR /&gt;106 0 2 1 49 306 0 1 2 46 506 0 1 1 46 606 0 1 2 56 706 1 1 1 75&lt;BR /&gt;201 1 1 3 35 401 1 2 1 44 507 1 1 2 44 607 1 1 1 67 707 1 1 1 46&lt;BR /&gt;202 0 2 1 50 402 0 2 2 77 508 0 2 1 53 608 0 2 2 46 708 0 2 1 55&lt;BR /&gt;203 1 1 2 49 403 1 1 1 45 509 0 1 1 45 609 1 2 1 72 709 0 2 2 57&lt;BR /&gt;204 0 2 1 60 404 1 1 1 59 510 0 1 3 65 610 0 1 1 29 710 0 1 1 63&lt;BR /&gt;205 1 1 3 39 405 0 2 1 49 511 1 2 2 43 611 1 2 1 65 711 1 1 2 61&lt;BR /&gt;206 1 2 1 67 406 1 1 2 33 512 1 1 1 39 612 1 1 2 46 712 0 . 1 49&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;**** CREATE FORMATS NEEDED FOR TABLE ROWS.;&lt;BR /&gt;proc format;&lt;BR /&gt;value gender&lt;BR /&gt;1 = "Male"&lt;BR /&gt;2 = "Female";&lt;BR /&gt;value race&lt;BR /&gt;1 = "White"&lt;BR /&gt;2 = "Black"&lt;BR /&gt;3 = "Other*";&lt;BR /&gt;run;&lt;BR /&gt;**** DUPLICATE THE INCOMING DATA SET FOR OVERALL COLUMN&lt;BR /&gt;**** CALCULATIONS SO NOW TRT HAS VALUES 0 = PLACEBO, 1 = ACTIVE,&lt;BR /&gt;**** AND 2 = OVERALL.;&lt;BR /&gt;data demog;&lt;BR /&gt;set demog;&lt;BR /&gt;output;&lt;BR /&gt;trt = 2;&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;BR /&gt;**** AGE STATISTICS PROGRAMMING ********************************;&lt;BR /&gt;**** GET P VALUE FROM NON PARAMETRIC COMPARISON OF AGE MEANS.;&lt;BR /&gt;proc npar1way&lt;BR /&gt;data = demog&lt;BR /&gt;wilcoxon&lt;BR /&gt;noprint;&lt;BR /&gt;where trt in (0,1);&lt;BR /&gt;class trt;&lt;BR /&gt;var age;&lt;BR /&gt;output out = pvalue wilcoxon;&lt;BR /&gt;run;&lt;BR /&gt;proc sort&lt;BR /&gt;data = demog;&lt;BR /&gt;by trt;&lt;BR /&gt;run;&lt;BR /&gt;***** GET AGE DESCRIPTIVE STATISTICS N, MEAN, STD, MIN, AND MAX.;&lt;BR /&gt;proc univariate&lt;BR /&gt;data = demog noprint;&lt;BR /&gt;by trt;&lt;BR /&gt;var age;&lt;BR /&gt;output out = age&lt;BR /&gt;n = _n mean = _mean std = _std min = _min&lt;BR /&gt;max = _max;&lt;BR /&gt;run;&lt;BR /&gt;**** FORMAT AGE DESCRIPTIVE STATISTICS FOR THE TABLE.;&lt;BR /&gt;data age;&lt;BR /&gt;set age;&lt;BR /&gt;format n mean sd min max $14.;&lt;BR /&gt;drop _n _mean _std _min _max;&lt;BR /&gt;n = put(_n,3.);&lt;BR /&gt;mean = put(_mean,7.1);&lt;BR /&gt;std = put(_std,8.2);&lt;BR /&gt;min = put(_min,7.1);&lt;BR /&gt;max = put(_max,7.1);&lt;BR /&gt;run;&lt;BR /&gt;**** TRANSPOSE AGE DESCRIPTIVE STATISTICS INTO COLUMNS.;&lt;BR /&gt;proc transpose&lt;BR /&gt;data = age&lt;BR /&gt;out = age&lt;BR /&gt;prefix = col;&lt;BR /&gt;var n mean std min max;&lt;BR /&gt;id trt;&lt;BR /&gt;run;&lt;BR /&gt;**** CREATE AGE FIRST ROW FOR THE TABLE.;&lt;BR /&gt;data label;&lt;BR /&gt;set pvalue(keep = p2_wil rename = (p2_wil = pvalue));&lt;BR /&gt;length label $ 85;&lt;BR /&gt;label = "Age (years)";&lt;BR /&gt;run;&lt;BR /&gt;**** APPEND AGE DESCRIPTIVE STATISTICS TO AGE P VALUE ROW AND&lt;BR /&gt;**** CREATE AGE DESCRIPTIVE STATISTIC ROW LABELS.;&lt;BR /&gt;data age;&lt;BR /&gt;length label $ 85 col0 col1 col2 $ 25 ;&lt;BR /&gt;set label age;&lt;BR /&gt;keep label col0 col1 col2 pvalue ;&lt;BR /&gt;if _n_ &amp;gt; 1 then&lt;BR /&gt;select;&lt;BR /&gt;when(_NAME_ = 'n') label = " N";&lt;BR /&gt;when(_NAME_ = 'mean') label = " Mean";&lt;BR /&gt;when(_NAME_ = 'std') label = " Standard Deviation";&lt;BR /&gt;when(_NAME_ = 'min') label = " Minimum";&lt;BR /&gt;when(_NAME_ = 'max') label = " Maximum";&lt;BR /&gt;otherwise;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;**** END OF AGE STATISTICS PROGRAMMING *************************;&lt;BR /&gt;**** GENDER STATISTICS PROGRAMMING *****************************;&lt;BR /&gt;**** GET SIMPLE FREQUENCY COUNTS FOR GENDER.;&lt;BR /&gt;proc freq&lt;BR /&gt;data = demog&lt;BR /&gt;noprint;&lt;BR /&gt;where trt ne .;&lt;BR /&gt;tables trt * gender / missing outpct out = gender;&lt;BR /&gt;run;&lt;BR /&gt;**** FORMAT GENDER N(%) AS DESIRED.;&lt;BR /&gt;data gender;&lt;BR /&gt;set gender;&lt;BR /&gt;where gender ne .;&lt;BR /&gt;length value $25;&lt;BR /&gt;value = put(count,4.) || ' (' || put(pct_row,5.1)||'%)';&lt;BR /&gt;run;&lt;BR /&gt;proc sort&lt;BR /&gt;data = gender;&lt;BR /&gt;by gender;&lt;BR /&gt;run;&lt;BR /&gt;**** TRANSPOSE THE GENDER SUMMARY STATISTICS.;&lt;BR /&gt;proc transpose&lt;BR /&gt;data = gender&lt;BR /&gt;out = gender(drop = _name_)&lt;BR /&gt;prefix = col;&lt;BR /&gt;by gender;&lt;BR /&gt;var value;&lt;BR /&gt;id trt;&lt;BR /&gt;run;&lt;BR /&gt;**** PERFORM CHI-SQUARE ON GENDER COMPARING ACTIVE VS PLACEBO.;&lt;BR /&gt;proc freq&lt;BR /&gt;data = demog&lt;BR /&gt;noprint;&lt;BR /&gt;where gender ne . and trt not in (.,2);&lt;BR /&gt;table gender * trt / chisq;&lt;BR /&gt;output out = pvalue pchi;&lt;BR /&gt;run;&lt;BR /&gt;**** CREATE GENDER FIRST ROW FOR THE TABLE.;&lt;BR /&gt;data label;&lt;BR /&gt;set pvalue(keep = p_pchi rename = (p_pchi = pvalue));&lt;BR /&gt;length label $ 85;&lt;BR /&gt;label = "Gender";&lt;BR /&gt;run;&lt;BR /&gt;**** APPEND GENDER DESCRIPTIVE STATISTICS TO GENDER P VALUE ROW&lt;BR /&gt;**** AND CREATE GENDER DESCRIPTIVE STATISTIC ROW LABELS.;&lt;BR /&gt;data gender;&lt;BR /&gt;length label $ 85 col0 col1 col2 $ 25 ;&lt;BR /&gt;set label gender;&lt;BR /&gt;keep label col0 col1 col2 pvalue ;&lt;BR /&gt;if _n_ &amp;gt; 1 then&lt;BR /&gt;label= " " || put(gender,gender.);&lt;BR /&gt;run;&lt;BR /&gt;**** END OF GENDER STATISTICS PROGRAMMING **********************;&lt;BR /&gt;**** RACE STATISTICS PROGRAMMING *******************************;&lt;BR /&gt;**** GET SIMPLE FREQUENCY COUNTS FOR RACE;&lt;BR /&gt;proc freq&lt;BR /&gt;data = demog&lt;BR /&gt;noprint;&lt;BR /&gt;where trt ne .;&lt;BR /&gt;tables trt * race / missing outpct out = race;&lt;BR /&gt;run;&lt;BR /&gt;**** FORMAT RACE N(%) AS DESIRED;&lt;BR /&gt;data race;&lt;BR /&gt;set race;&lt;BR /&gt;where race ne .;&lt;BR /&gt;length value $25;&lt;BR /&gt;value = put(count,4.) || ' (' || put(pct_row,5.1)||'%)';&lt;BR /&gt;run;&lt;BR /&gt;proc sort&lt;BR /&gt;data = race;&lt;BR /&gt;by race;&lt;BR /&gt;run;&lt;BR /&gt;**** TRANSPOSE THE RACE SUMMARY STATISTICS;&lt;BR /&gt;proc transpose&lt;BR /&gt;data = race&lt;BR /&gt;out = race(drop = _name_)&lt;BR /&gt;prefix=col;&lt;BR /&gt;by race;&lt;BR /&gt;var value;&lt;BR /&gt;id trt;&lt;BR /&gt;run;&lt;BR /&gt;**** PERFORM FISHER'S EXACT ON RACE COMPARING ACTIVE VS PLACEBO.;&lt;BR /&gt;proc freq&lt;BR /&gt;data = demog&lt;BR /&gt;noprint;&lt;BR /&gt;where race ne . and trt not in (.,2);&lt;BR /&gt;table race * trt / exact;&lt;BR /&gt;output out = pvalue exact;&lt;BR /&gt;run;&lt;BR /&gt;**** CREATE RACE FIRST ROW FOR THE TABLE.;&lt;BR /&gt;data label;&lt;BR /&gt;set pvalue(keep = xp2_fish rename = (xp2_fish = pvalue));&lt;BR /&gt;length label $ 85;&lt;BR /&gt;label = "Race";&lt;BR /&gt;run;&lt;BR /&gt;**** APPEND RACE DESCRIPTIVE STATISTICS TO RACE P VALUE ROW AND&lt;BR /&gt;**** CREATE RACE DESCRIPTIVE STATISTIC ROW LABELS.;&lt;BR /&gt;data race;&lt;BR /&gt;length label $ 85 col0 col1 col2 $ 25 ;&lt;BR /&gt;set label race;&lt;BR /&gt;keep label col0 col1 col2 pvalue ;&lt;BR /&gt;if _n_ &amp;gt; 1 then&lt;BR /&gt;label= " " || put(race,race.);&lt;BR /&gt;run;&lt;BR /&gt;**** END OF RACE STATISTICS PROGRAMMING ************************;&lt;BR /&gt;**** CONCATENATE AGE, GENDER, AND RACE STATISTICS AND CREATE&lt;BR /&gt;**** GROUPING GROUP VARIABLE FOR LINE SKIPPING IN PROC REPORT.;&lt;BR /&gt;data forreport;&lt;BR /&gt;set age(in = in1)&lt;BR /&gt;gender(in = in2)&lt;BR /&gt;race(in = in3);&lt;BR /&gt;group = sum(in1 * 1, in2 * 2, in3 * 3);&lt;BR /&gt;run;&lt;BR /&gt;**** DEFINE THREE MACRO VARIABLES &amp;amp;N0, &amp;amp;N1, AND &amp;amp;NT THAT ARE USED&lt;BR /&gt;**** IN THE COLUMN HEADERS FOR "PLACEBO," "ACTIVE" AND "OVERALL"&lt;BR /&gt;**** THERAPY GROUPS.;&lt;BR /&gt;data _null_;&lt;BR /&gt;set demog end = eof;&lt;BR /&gt;**** CREATE COUNTER FOR N0 = PLACEBO, N1 = ACTIVE.;&lt;BR /&gt;if trt = 0 then&lt;BR /&gt;n0 + 1;&lt;BR /&gt;else if trt = 1 then&lt;BR /&gt;n1 + 1;&lt;BR /&gt;**** CREATE OVERALL COUNTER NT.;&lt;BR /&gt;nt + 1;&lt;BR /&gt;**** CREATE MACRO VARIABLES &amp;amp;N0, &amp;amp;N1, AND &amp;amp;NT.;&lt;BR /&gt;if eof then&lt;BR /&gt;do;&lt;BR /&gt;call symput("n0",compress('(N='||put(n0,4.) || ')'));&lt;BR /&gt;call symput("n1",compress('(N='||put(n1,4.) || ')'));&lt;BR /&gt;call symput("nt",compress('(N='||put(nt,4.) || ')'));&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;**** USE PROC REPORT TO WRITE THE TABLE TO FILE.;&lt;BR /&gt;ods pdf file='C:\Users\abc\Desktop\1111.pdf';/* to define your own file path*/&lt;/P&gt;&lt;P&gt;options nonumber nodate ls = 100 ps=35 missing = " " formchar = "|----|+|---+=|-/\&amp;lt;&amp;gt;*";&lt;BR /&gt;proc report&lt;BR /&gt;data = forreport&lt;BR /&gt;nowindows&lt;BR /&gt;spacing = 1&lt;BR /&gt;headline&lt;BR /&gt;headskip&lt;BR /&gt;split = "|";&lt;BR /&gt;columns ("--" group label col1 col0 col2 pvalue);&lt;BR /&gt;define group /order order = internal noprint;&lt;BR /&gt;define label /display width=23 " ";&lt;BR /&gt;define col0 /display center width = 14 "Placebo|&amp;amp;n0";&lt;BR /&gt;define col1 /display center width = 14 "Active|&amp;amp;n1";&lt;BR /&gt;define col2 /display center width = 14 "Overall|&amp;amp;nt";&lt;BR /&gt;define pvalue /display center width = 14 " |P-value**"&lt;BR /&gt;f = pvalue6.4;&lt;BR /&gt;break after group / skip;&lt;BR /&gt;title1 "Company "&lt;BR /&gt;" ";&lt;BR /&gt;title2 "Protocol Name "&lt;BR /&gt;" ";&lt;BR /&gt;title3 "Table 5.3";&lt;BR /&gt;title4 "Demographics";&lt;BR /&gt;footnote1 "------------------------------------------"&lt;BR /&gt;"-----------------------------------------";&lt;BR /&gt;footnote2 "* Other includes Asian, Native Amerian, and other"&lt;BR /&gt;" races. ";&lt;BR /&gt;footnote3 "** P-values: Age = Wilcoxon rank-sum, Gender "&lt;BR /&gt;"= Pearson's chi-square, ";&lt;BR /&gt;footnote4 " Race = Fisher's exact test. "&lt;BR /&gt;" ";&lt;BR /&gt;footnote5 "Created by %sysfunc(getoption(sysin)) on"&lt;BR /&gt;" &amp;amp;sysdate9..";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods pdf close;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 17:24:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295261#M16741</guid>
      <dc:creator>Niugg2010</dc:creator>
      <dc:date>2016-08-30T17:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: ODS for pdf report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295316#M16743</link>
      <description>&lt;P&gt;ODS Output uses STYLES to control most appearance items of tables by default. Change the style&amp;nbsp; and you get difference appearance. Many of the "traditional" items such as FORMCHAR do not have any effect on ODS.&lt;/P&gt;
&lt;P&gt;If you do not specify a style when using ODS PDF it will default to one that treats tables like one of the JOURNAL Styles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try adding Style=Default to your ODS PDF statement and see how the output changes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not that Proc Report allows style overrides to modify the appearance of cells, columns or rows.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 20:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295316#M16743</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-30T20:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: ODS for pdf report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295353#M16745</link>
      <description>&lt;P&gt;You are correct. If I set style=default, pdf table looks some different. However it is still different from the listing output.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 00:26:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295353#M16745</guid>
      <dc:creator>Niugg2010</dc:creator>
      <dc:date>2016-08-31T00:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: ODS for pdf report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295370#M16746</link>
      <description>&lt;PRE&gt;
Try style

ods pdf style=journal  ;



&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Aug 2016 02:44:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295370#M16746</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-31T02:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: ODS for pdf report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295383#M16747</link>
      <description>&lt;P&gt;Thanks. I will try it.&lt;/P&gt;&lt;P&gt;Did you used %sysfunc(getoption(sysin)) &amp;nbsp;macro to get a path for the code saving? it does not work for me.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 04:26:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295383#M16747</guid>
      <dc:creator>Niugg2010</dc:creator>
      <dc:date>2016-08-31T04:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: ODS for pdf report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295387#M16748</link>
      <description>&lt;PRE&gt;
Here is the solution. Check the FOOTNOTE statement at the end of code.
Pick up one of them. Save it before running it .





data demog;
label subjid = "Subject Number"
trt = "Treatment"
gender = "Gender"
race = "Race"
age = "Age";
input subjid trt gender race age @@;
datalines;
101 0 1 3 37 301 0 1 1 70 501 0 1 2 33 601 0 1 1 50 701 1 1 1 60
102 1 2 1 65 302 0 1 2 55 502 1 2 1 44 602 0 2 2 30 702 0 1 1 28
103 1 1 2 32 303 1 1 1 65 503 1 1 1 64 603 1 2 1 33 703 1 1 2 44
104 0 2 1 23 304 0 1 1 45 504 0 1 3 56 604 0 1 1 65 704 0 2 1 66
105 1 1 3 44 305 1 1 1 36 505 1 1 2 73 605 1 2 1 57 705 1 1 2 46
106 0 2 1 49 306 0 1 2 46 506 0 1 1 46 606 0 1 2 56 706 1 1 1 75
201 1 1 3 35 401 1 2 1 44 507 1 1 2 44 607 1 1 1 67 707 1 1 1 46
202 0 2 1 50 402 0 2 2 77 508 0 2 1 53 608 0 2 2 46 708 0 2 1 55
203 1 1 2 49 403 1 1 1 45 509 0 1 1 45 609 1 2 1 72 709 0 2 2 57
204 0 2 1 60 404 1 1 1 59 510 0 1 3 65 610 0 1 1 29 710 0 1 1 63
205 1 1 3 39 405 0 2 1 49 511 1 2 2 43 611 1 2 1 65 711 1 1 2 61
206 1 2 1 67 406 1 1 2 33 512 1 1 1 39 612 1 1 2 46 712 0 . 1 49
;
run;

proc sql;
create table temp as
select 'A' as group,
       'Age(years)' as group1 length=20,
       'Active' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)
union all
select 'A' as group,
       'Age(years)' as group1 length=20,
       'Placebo' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)
union all
select 'A' as group,
       'Age(years)' as group1 length=20,
       'Overall' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)
union all
select 'A' as group,
       'Age(years)' as group1 length=20,
       'Pvalue' as group2 length=20,
	   '0.95' as value length=20
 from demog(obs=1)
union all



select 'A' as group,
       'N' as group1 length=20,
       'Active' as group2 length=20,
	   put(count(age),8.-l) as value length=20
 from demog
  where trt=1 
union all
select 'A' as group,
       'N' as group1 length=20,
       'Placebo' as group2 length=20,
	   put(count(age),8.-l) as value length=20
 from demog
   where trt=0
union all
select 'A' as group,
       'N' as group1 length=20,
       'Overall' as group2 length=20,
	   put(count(age),8.-l) as value length=20
 from demog
union all
select 'A' as group,
       'N' as group1 length=20,
       'Pvalue' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)





union all
select 'A' as group,
       'Mean' as group1 length=20,
       'Active' as group2 length=20,
	   put(mean(age),8.1 -l) as value length=20
 from demog
  where trt=1 
union all
select 'A' as group,
       'Mean' as group1 length=20,
       'Placebo' as group2 length=20,
	   put(mean(age),8.1 -l) as value length=20
 from demog
   where trt=0
union all
select 'A' as group,
       'Mean' as group1 length=20,
       'Overall' as group2 length=20,
	   put(mean(age),8.1 -l) as value length=20
 from demog
union all
select 'A' as group,
       'Mean' as group1 length=20,
       'Pvalue' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)





union all
select 'A' as group,
       'Standard Deviation' as group1 length=20,
       'Active' as group2 length=20,
	   put(std(age),8.2-l) as value length=20
 from demog
  where trt=1 
union all
select 'A' as group,
       'Standard Deviation' as group1 length=20,
       'Placebo' as group2 length=20,
	   put(std(age),8.2-l) as value length=20
 from demog
   where trt=0
union all
select 'A' as group,
       'Standard Deviation' as group1 length=20,
       'Overall' as group2 length=20,
	   put(std(age),8.2-l) as value length=20
 from demog
union all
select 'A' as group,
       'Standard Deviation' as group1 length=20,
       'Pvalue' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)




 
union all
select 'A' as group,
       'Minimum' as group1 length=20,
       'Active' as group2 length=20,
	   put(min(age),8.1-l) as value length=20
 from demog
  where trt=1 
union all
select 'A' as group,
       'Minimum' as group1 length=20,
       'Placebo' as group2 length=20,
	   put(min(age),8.1-l) as value length=20
 from demog
   where trt=0
union all
select 'A' as group,
       'Minimum' as group1 length=20,
       'Overall' as group2 length=20,
	   put(min(age),8.1-l) as value length=20
 from demog
union all
select 'A' as group,
       'Minimum' as group1 length=20,
       'Pvalue' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)







 
union all
select 'A' as group,
       'Maximum' as group1 length=20,
       'Active' as group2 length=20,
	   put(max(age),8.1-l) as value length=20
 from demog
  where trt=1 
union all
select 'A' as group,
       'Maximum' as group1 length=20,
       'Placebo' as group2 length=20,
	   put(max(age),8.1-l) as value length=20
 from demog
   where trt=0
union all
select 'A' as group,
       'Maximum' as group1 length=20,
       'Overall' as group2 length=20,
	   put(max(age),8.1-l) as value length=20
 from demog
union all
select 'A' as group,
       'Maximum' as group1 length=20,
       'Pvalue' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)





/****************************/
union all
 select 'B' as group,
       'Gender' as group1 length=20,
       'Active' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)
union all
select 'B' as group,
       'Gender' as group1 length=20,
       'Placebo' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)
union all
select 'B' as group,
       'Gender' as group1 length=20,
       'Overall' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)
union all
select 'B' as group,
       'Gender' as group1 length=20,
       'Pvalue' as group2 length=20,
	   '0.268' as value length=20
 from demog(obs=1)





union all
select 'B' as group,
       'Male' as group1 length=20,
       'Active' as group2 length=20,
	   catx(' ',put(count(gender),8.-l),'(',
       put(count(gender)/(select count(gender) from demog where trt=1),percent8.1)
       ,')') as value length=20
 from demog
  where trt=1 and gender=1
union all
select 'B' as group,
       'Male' as group1 length=20,
       'Placebo' as group2 length=20,
	   catx(' ',put(count(gender),8.-l),'(',
       put(count(gender)/(select count(gender) from demog where trt=0),percent8.1)
       ,')') as value length=20
 from demog
  where trt=0 and gender=1
union all
select 'B' as group,
       'Male' as group1 length=20,
       'Overall' as group2 length=20,
	   catx(' ',put(count(gender),8.-l),'(',
       put(count(gender)/(select count(gender) from demog),percent8.1)
       ,')') as value length=20
 from demog
  where gender=1
union all
select 'B' as group,
       'Male' as group1 length=20,
       'Pvalue' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)






union all
select 'B' as group,
       'Female' as group1 length=20,
       'Active' as group2 length=20,
	   catx(' ',put(count(gender),8.-l),'(',
       put(count(gender)/(select count(gender) from demog where trt=1),percent8.1)
       ,')') as value length=20
 from demog
  where trt=1 and gender=2
union all
select 'B' as group,
       'Female' as group1 length=20,
       'Placebo' as group2 length=20,
	   catx(' ',put(count(gender),8.-l),'(',
       put(count(gender)/(select count(gender) from demog where trt=0),percent8.1)
       ,')') as value length=20
 from demog
  where trt=0 and gender=2
union all
select 'B' as group,
       'Female' as group1 length=20,
       'Overall' as group2 length=20,
	   catx(' ',put(count(gender),8.-l),'(',
       put(count(gender)/(select count(gender) from demog),percent8.1)
       ,')') as value length=20
 from demog
  where gender=2
union all
select 'B' as group,
       'Female' as group1 length=20,
       'Pvalue' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)



/***************************/
union all
 select 'C' as group,
       'Race' as group1 length=20,
       'Active' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)
union all
select 'C' as group,
       'Race' as group1 length=20,
       'Placebo' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)
union all
select 'C' as group,
       'Race' as group1 length=20,
       'Overall' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)
union all
select 'C' as group,
       'Race' as group1 length=20,
       'Pvalue' as group2 length=20,
	   '0.927' as value length=20
 from demog(obs=1)
 
 
 
 
 
union all
select 'C' as group,
       'White' as group1 length=20,
       'Active' as group2 length=20,
	   catx(' ',put(count(race),8.-l),'(',
       put(count(race)/(select count(race) from demog where trt=1),percent8.1)
       ,')') as value length=20
 from demog
  where trt=1 and race=1
union all
select 'C' as group,
       'White' as group1 length=20,
       'Placebo' as group2 length=20,
	   catx(' ',put(count(race),8.-l),'(',
       put(count(race)/(select count(race) from demog where trt=0),percent8.1)
       ,')') as value length=20
 from demog
  where trt=0 and race=1
union all
select 'C' as group,
       'White' as group1 length=20,
       'Overall' as group2 length=20,
	   catx(' ',put(count(race),8.-l),'(',
       put(count(race)/(select count(race) from demog),percent8.1)
       ,')') as value length=20
 from demog
  where race=1
union all
select 'C' as group,
       'White' as group1 length=20,
       'Pvalue' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1)
 
 
 

 
union all
select 'C' as group,
       'Black' as group1 length=20,
       'Active' as group2 length=20,
	   catx(' ',put(count(race),8.-l),'(',
       put(count(race)/(select count(race) from demog where trt=1),percent8.1)
       ,')') as value length=20
 from demog
  where trt=1 and race=2
union all
select 'C' as group,
       'Black' as group1 length=20,
       'Placebo' as group2 length=20,
	   catx(' ',put(count(race),8.-l),'(',
       put(count(race)/(select count(race) from demog where trt=0),percent8.1)
       ,')') as value length=20
 from demog
  where trt=0 and race=2
union all
select 'C' as group,
       'Black' as group1 length=20,
       'Overall' as group2 length=20,
	   catx(' ',put(count(race),8.-l),'(',
       put(count(race)/(select count(race) from demog),percent8.1)
       ,')') as value length=20
 from demog
  where race=2
union all
select 'C' as group,
       'Black' as group1 length=20,
       'Pvalue' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1) 
 
 
 


 
union all
select 'C' as group,
       'Other*' as group1 length=20,
       'Active' as group2 length=20,
	   catx(' ',put(count(race),8.-l),'(',
       put(count(race)/(select count(race) from demog where trt=1),percent8.1)
       ,')') as value length=20
 from demog
  where trt=1 and race=3
union all
select 'C' as group,
       'Other*' as group1 length=20,
       'Placebo' as group2 length=20,
	   catx(' ',put(count(race),8.-l),'(',
       put(count(race)/(select count(race) from demog where trt=0),percent8.1)
       ,')') as value length=20
 from demog
  where trt=0 and race=3
union all
select 'C' as group,
       'Other*' as group1 length=20,
       'Overall' as group2 length=20,
	   catx(' ',put(count(race),8.-l),'(',
       put(count(race)/(select count(race) from demog),percent8.1)
       ,')') as value length=20
 from demog
  where race=3
union all
select 'C' as group,
       'Other*' as group1 length=20,
       'Pvalue' as group2 length=20,
	   ' ' as value length=20
 from demog(obs=1) 
  
;
quit;

proc transpose data=temp out=want(drop=_name_);
 by group group1 notsorted;
 var value;
 id group2;
run;

ods pdf file='/folders/myfolders/want.pdf' style=journal;
title "Company";
footnote1 "Created by %sysget(SAS_EXECFILENAME) on  &amp;amp;sysdate9.";
footnote2 "Created by &amp;amp;_sasprogramfile on &amp;amp;sysdate9.";
proc report data=want nowd;
define group/group noprint;
define group1/ ' ';
compute before group;
 line ' ';
endcomp;
run;
ods pdf close;


&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Aug 2016 05:06:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295387#M16748</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-31T05:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: ODS for pdf report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295392#M16749</link>
      <description>&lt;P&gt;The code is cool. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 05:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-for-pdf-report/m-p/295392#M16749</guid>
      <dc:creator>Niugg2010</dc:creator>
      <dc:date>2016-08-31T05:31:40Z</dc:date>
    </item>
  </channel>
</rss>

