<?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 Re: proc report with ODS layout in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-report-with-ODS-layout/m-p/333812#M75290</link>
    <description>&lt;P&gt;What ODS destination are you using?&lt;/P&gt;
&lt;P&gt;And does this have to fit on actual paper or a logic page in a document? If not intended for print you can set options Papersize to a height and width that could work.&lt;/P&gt;
&lt;P&gt;Though you my be chasing a goal that is difficult to obtain due to the nature of your data. As soon as you solve this for a patient with 100 rows of data you'll get a new one with 200 rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This mixing of data sets is a headache in that you either are going to get into macro coding to loop over patients and then do the output for each patient or a radical restructure of data.&lt;/P&gt;
&lt;P&gt;Here is some pseudo code as an example of a macro approach:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro mix;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select distinct PatientID into : Patients separated by " "&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from yourdatasetwithpatientids;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;%let PatCount=&amp;amp;sqlobs; /* this will have the number of unique patient ids*/&lt;/P&gt;
&lt;P&gt;%do i = 1 %to &amp;amp;Patcount;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; %let pat = %scan(&amp;amp;patients,&amp;amp;i); /* patient id for this report*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;process first data set with WHERE patientid = "&amp;amp;pat"&amp;nbsp;&amp;nbsp; or =pat depending on whether your id is character or numeric&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;process second dataset with Where on the patientid as above&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;process third dataset with where as above&amp;gt;&lt;/P&gt;
&lt;P&gt;%end;&lt;/P&gt;
&lt;P&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2017 15:43:06 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-02-17T15:43:06Z</dc:date>
    <item>
      <title>proc report with ODS layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-with-ODS-layout/m-p/333793#M75284</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating patient profile data where i need to place all data for one subject on same page but due to number of rows and number of columns in dataset i am not able to accomodate on same page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to place data from first two dataset on first page and data from another two dataset on second page and data from last datasets on third page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please guide how can we do this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 14:57:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-with-ODS-layout/m-p/333793#M75284</guid>
      <dc:creator>draroda</dc:creator>
      <dc:date>2017-02-17T14:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: proc report with ODS layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-with-ODS-layout/m-p/333797#M75285</link>
      <description>&lt;P&gt;Can you provide a sample of your data and&amp;nbsp;the code you have tried so far? Fitting data on to pages is generally an exercise in adjusting font size, column label, data formatting, column widths, co-ordinates of regions, etc.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 15:10:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-with-ODS-layout/m-p/333797#M75285</guid>
      <dc:creator>nehalsanghvi</dc:creator>
      <dc:date>2017-02-17T15:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: proc report with ODS layout</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-with-ODS-layout/m-p/333812#M75290</link>
      <description>&lt;P&gt;What ODS destination are you using?&lt;/P&gt;
&lt;P&gt;And does this have to fit on actual paper or a logic page in a document? If not intended for print you can set options Papersize to a height and width that could work.&lt;/P&gt;
&lt;P&gt;Though you my be chasing a goal that is difficult to obtain due to the nature of your data. As soon as you solve this for a patient with 100 rows of data you'll get a new one with 200 rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This mixing of data sets is a headache in that you either are going to get into macro coding to loop over patients and then do the output for each patient or a radical restructure of data.&lt;/P&gt;
&lt;P&gt;Here is some pseudo code as an example of a macro approach:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro mix;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select distinct PatientID into : Patients separated by " "&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from yourdatasetwithpatientids;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;%let PatCount=&amp;amp;sqlobs; /* this will have the number of unique patient ids*/&lt;/P&gt;
&lt;P&gt;%do i = 1 %to &amp;amp;Patcount;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; %let pat = %scan(&amp;amp;patients,&amp;amp;i); /* patient id for this report*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;process first data set with WHERE patientid = "&amp;amp;pat"&amp;nbsp;&amp;nbsp; or =pat depending on whether your id is character or numeric&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;process second dataset with Where on the patientid as above&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;process third dataset with where as above&amp;gt;&lt;/P&gt;
&lt;P&gt;%end;&lt;/P&gt;
&lt;P&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 15:43:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-with-ODS-layout/m-p/333812#M75290</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-02-17T15:43:06Z</dc:date>
    </item>
  </channel>
</rss>

