<?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 How to create a pdf page with 2 columns using ODS with a centered header? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-pdf-page-with-2-columns-using-ODS-with-a/m-p/937931#M368485</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a SAS report that has some pages with 2 columns with one centered header for the section. Code and output below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;ods pdf startpage = now;&lt;/DIV&gt;
&lt;DIV&gt;ods pdf columns = 2;&lt;/DIV&gt;
&lt;DIV&gt;ODS TEXT = "~{newline 1}";&lt;/DIV&gt;
&lt;DIV&gt;ODS TEXT = "~{STYLE[JUST = C FONTWEIGHT = BOLD FONTSIZE = 12PT]Study Stop}";&lt;/DIV&gt;
&lt;DIV&gt;ODS TEXT = "~{newline 1}";&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; proc sort data=current.status_file; by descending stop_date; run;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; PROC REPORT DATA = current.status_file NOWD HEADLINE BOX SPLIT = "\";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; column study_id stop_date ss_reason ssreas_othersp withdraw_reason;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; where ss_reason ne .;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define study_id / center "ID";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define stop_date / center order = internal "Stop Date" format = MMDDYY10.;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define ss_reason / display center "Reason" format=ss.;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define ssreas_othersp / display center "Other reason";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define withdraw_reason / display center "Withdrawal Reason";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; run;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;ods pdf close;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Corinthian94_0-1722521145713.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98932i198D5750DE72776F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Corinthian94_0-1722521145713.png" alt="Corinthian94_0-1722521145713.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am able to get two columns using ODS PFF columns=2, but this then puts the header over the first column instead of at the center at the top of the page. Is there a way to center this in the middle of the two columns? I have tried to find something but have not had any luck, and anything I try gets rid of the two columns which is more important for the formatting than the title being in the middle. Thanks in advance for your help!&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2024 14:08:00 GMT</pubDate>
    <dc:creator>Corinthian94</dc:creator>
    <dc:date>2024-08-01T14:08:00Z</dc:date>
    <item>
      <title>How to create a pdf page with 2 columns using ODS with a centered header?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-pdf-page-with-2-columns-using-ODS-with-a/m-p/937931#M368485</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a SAS report that has some pages with 2 columns with one centered header for the section. Code and output below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;ods pdf startpage = now;&lt;/DIV&gt;
&lt;DIV&gt;ods pdf columns = 2;&lt;/DIV&gt;
&lt;DIV&gt;ODS TEXT = "~{newline 1}";&lt;/DIV&gt;
&lt;DIV&gt;ODS TEXT = "~{STYLE[JUST = C FONTWEIGHT = BOLD FONTSIZE = 12PT]Study Stop}";&lt;/DIV&gt;
&lt;DIV&gt;ODS TEXT = "~{newline 1}";&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; proc sort data=current.status_file; by descending stop_date; run;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; PROC REPORT DATA = current.status_file NOWD HEADLINE BOX SPLIT = "\";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; column study_id stop_date ss_reason ssreas_othersp withdraw_reason;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; where ss_reason ne .;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define study_id / center "ID";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define stop_date / center order = internal "Stop Date" format = MMDDYY10.;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define ss_reason / display center "Reason" format=ss.;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define ssreas_othersp / display center "Other reason";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define withdraw_reason / display center "Withdrawal Reason";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; run;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;ods pdf close;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Corinthian94_0-1722521145713.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98932i198D5750DE72776F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Corinthian94_0-1722521145713.png" alt="Corinthian94_0-1722521145713.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am able to get two columns using ODS PFF columns=2, but this then puts the header over the first column instead of at the center at the top of the page. Is there a way to center this in the middle of the two columns? I have tried to find something but have not had any luck, and anything I try gets rid of the two columns which is more important for the formatting than the title being in the middle. Thanks in advance for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 14:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-pdf-page-with-2-columns-using-ODS-with-a/m-p/937931#M368485</guid>
      <dc:creator>Corinthian94</dc:creator>
      <dc:date>2024-08-01T14:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pdf page with 2 columns using ODS with a centered header?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-pdf-page-with-2-columns-using-ODS-with-a/m-p/938050#M368515</link>
      <description>&lt;P&gt;Can't you use TITLE statement ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
 set sashelp.heart(obs=100);
 keep sex height;
run;

title 'xxxxxxxxxx';
options nodate nonumber;
ods pdf file='c:\temp\temp.pdf' columns=2 startpage=no;
proc report data=have nowd;
run;
ods pdf close;


&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1722568924286.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98974iFE33958880BC5F5F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1722568924286.png" alt="Ksharp_0-1722568924286.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 03:22:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-pdf-page-with-2-columns-using-ODS-with-a/m-p/938050#M368515</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-08-02T03:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pdf page with 2 columns using ODS with a centered header?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-pdf-page-with-2-columns-using-ODS-with-a/m-p/940459#M369144</link>
      <description>&lt;P&gt;Thanks for this! Sorry this is so late - this is part of a larger report that has titles on each page, so the title statement is already used for something else at the beginning of the report. I need this specific page to have two columns and a centered header (my code for this page is below). Is there a way to make the title for just this paged centered? Thanks!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;ods pdf startpage = now;&lt;/DIV&gt;
&lt;DIV&gt;ODS TEXT = "~{newline 1}";&lt;/DIV&gt;
&lt;DIV&gt;ODS TEXT = "~{STYLE[JUST = C FONTWEIGHT = BOLD FONTSIZE = 12PT]Study Stop}";&lt;/DIV&gt;
&lt;DIV&gt;ODS TEXT = "~{newline 1}";&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; PROC REPORT DATA = file NOWD HEADLINE BOX SPLIT = "\";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; column var var2 ss_reason ssreas_othersp withdraw_reason;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; where ss_reason ne .;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define var / center "ID";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define var2 / center order = internal "Stop Date" format = MMDDYY10.;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define ss_reason / display center "Reason" format=ss.;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define ssreas_othersp / display center "Other reason";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; define withdraw_reason / display center "Withdrawal Reason";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; run;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;ods pdf close;&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Aug 2024 14:19:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-pdf-page-with-2-columns-using-ODS-with-a/m-p/940459#M369144</guid>
      <dc:creator>Corinthian94</dc:creator>
      <dc:date>2024-08-22T14:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pdf page with 2 columns using ODS with a centered header?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-pdf-page-with-2-columns-using-ODS-with-a/m-p/940555#M369164</link>
      <description>&lt;P&gt;Nope. I have no idea about it. Maybe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp; could give you a hand.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 00:31:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-pdf-page-with-2-columns-using-ODS-with-a/m-p/940555#M369164</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-08-23T00:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pdf page with 2 columns using ODS with a centered header?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-pdf-page-with-2-columns-using-ODS-with-a/m-p/940559#M369167</link>
      <description>Hi: If you're going to use ODS TEXT, and you want to change the style from the default placement I believe you need to change the style template used for the output. There's an example of doing this in the documentation &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p14gx25pepks6dn1q9m7vkq3gfoi.htm#n0rx93bn3orev5n1ogar2yb813kra" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p14gx25pepks6dn1q9m7vkq3gfoi.htm#n0rx93bn3orev5n1ogar2yb813kra&lt;/A&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Fri, 23 Aug 2024 01:27:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-pdf-page-with-2-columns-using-ODS-with-a/m-p/940559#M369167</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2024-08-23T01:27:28Z</dc:date>
    </item>
  </channel>
</rss>

