<?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 Need help in creating report using Tabulate in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-creating-report-using-Tabulate/m-p/297168#M16821</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I am trying to create a report using proc tabulate&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;option missing=0 nonumber nodate ;
options orientation=landscape;
ods listing;
ods escapechar='^';
ods pdf file="\\ipsen-group.net\citrix\Data\SAS_NDA_TEST\FG Reports\Output\SAE_Tabulation_Clinical_Trial_&amp;amp;file_app..pdf";
Title1 J=C  font=courier "Cumulative tabulation of serious adverse events from clinical trials"  ;
Title2 j=center font=courier "&amp;amp;date_type_disp1 from &amp;amp;cum_strt_dt to &amp;amp;cum_end_dt" ;
Title3 j=c font=courier "&amp;amp;rpt_hdr_sd_disp";
Title4 j=c font=courier "&amp;amp;rpt_hdr_prot_disp";

footnote justify=center 'Page ^{thispage}'; 

PROC TABULATE DATA=FINAL;
VAR COUNT / STYLE=[textalign=center];
CLASS SOC MEDDRA_PT PRODUCT;
TABLE SOC=''*(MEDDRA_PT=''/ box='MEDDRA_PT' ALL=''), (PRODUCT='' ALL='Total')*COUNT=''*sum=''*F=6.;
RUN;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;BR /&gt;Now the code is giving me two issues.&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4859iA3FDA1ED15CC41C1/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="proc tabulate outpt.png" title="proc tabulate outpt.png" /&gt;&lt;BR /&gt;&lt;BR /&gt;MedDRA_PT is getting repeated which i don't want.i want the labels SOC and MEDDRA_PT at the start of the &lt;BR /&gt;report in coulmn headings.&lt;BR /&gt;Other issue is i want the sum row to be shifted to the top.Instead of coming at the last in the group, i want this &lt;BR /&gt;to be shifted at the start of teh group of SOC.&lt;BR /&gt;Please advice me how i can achieve this.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 08 Sep 2016 12:50:52 GMT</pubDate>
    <dc:creator>sameer_123</dc:creator>
    <dc:date>2016-09-08T12:50:52Z</dc:date>
    <item>
      <title>Need help in creating report using Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-creating-report-using-Tabulate/m-p/297168#M16821</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I am trying to create a report using proc tabulate&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;option missing=0 nonumber nodate ;
options orientation=landscape;
ods listing;
ods escapechar='^';
ods pdf file="\\ipsen-group.net\citrix\Data\SAS_NDA_TEST\FG Reports\Output\SAE_Tabulation_Clinical_Trial_&amp;amp;file_app..pdf";
Title1 J=C  font=courier "Cumulative tabulation of serious adverse events from clinical trials"  ;
Title2 j=center font=courier "&amp;amp;date_type_disp1 from &amp;amp;cum_strt_dt to &amp;amp;cum_end_dt" ;
Title3 j=c font=courier "&amp;amp;rpt_hdr_sd_disp";
Title4 j=c font=courier "&amp;amp;rpt_hdr_prot_disp";

footnote justify=center 'Page ^{thispage}'; 

PROC TABULATE DATA=FINAL;
VAR COUNT / STYLE=[textalign=center];
CLASS SOC MEDDRA_PT PRODUCT;
TABLE SOC=''*(MEDDRA_PT=''/ box='MEDDRA_PT' ALL=''), (PRODUCT='' ALL='Total')*COUNT=''*sum=''*F=6.;
RUN;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;BR /&gt;Now the code is giving me two issues.&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4859iA3FDA1ED15CC41C1/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="proc tabulate outpt.png" title="proc tabulate outpt.png" /&gt;&lt;BR /&gt;&lt;BR /&gt;MedDRA_PT is getting repeated which i don't want.i want the labels SOC and MEDDRA_PT at the start of the &lt;BR /&gt;report in coulmn headings.&lt;BR /&gt;Other issue is i want the sum row to be shifted to the top.Instead of coming at the last in the group, i want this &lt;BR /&gt;to be shifted at the start of teh group of SOC.&lt;BR /&gt;Please advice me how i can achieve this.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Sep 2016 12:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-creating-report-using-Tabulate/m-p/297168#M16821</guid>
      <dc:creator>sameer_123</dc:creator>
      <dc:date>2016-09-08T12:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in creating report using Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-creating-report-using-Tabulate/m-p/297181#M16822</link>
      <description>&lt;PRE&gt;
I think you need calculated these value before using proc tabulate.


proc sql;
create table class as
select sex,age,sum(weight) as weight,sum(height) as height
 from sashelp.class
  group by sex,age
union all 
select sex,.,sum(weight),sum(height)
 from sashelp.class
  group by sex;
quit;

proc tabulate data=class;
class sex age/missing;
var weight height;
table sex*age,weight height/ misstext=' ' ;
keylabel sum=' ';
run;

&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Sep 2016 13:29:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-creating-report-using-Tabulate/m-p/297181#M16822</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-09-08T13:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in creating report using Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-creating-report-using-Tabulate/m-p/297187#M16823</link>
      <description>&lt;P&gt;To address your last issue first. When you use the ALL instruction the order in the syntax determines the location of the summary.&lt;/P&gt;
&lt;P&gt;So (Product All) says to put the summary at the end (right) of the products. Change the order to (All Product) to have the summary appear before (left of)&amp;nbsp;the Products.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tabulate doesn't do a good spanning header in the box.&lt;/P&gt;
&lt;P&gt;I also think the example syntax you posted didn't create the example text as your location of BOX is incorrect and should generate an error message.&lt;/P&gt;
&lt;P&gt;This may help a bit for your table statement&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TABLE SOC=''*(ALL='' MEDDRA_PT='' ), 
      (ALL='Total'PRODUCT='' )*COUNT=''*sum=''*F=6.
      / box='SOC                  MEDDRA_PT';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You may want to investigate use of CLASSLEV options for SOC and MEDDRA_PT to controll the width of the column so the Box= text aligns better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 14:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-creating-report-using-Tabulate/m-p/297187#M16823</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-08T14:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in creating report using Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-creating-report-using-Tabulate/m-p/297212#M16824</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your detailed and simple answer.The box option is working and i will investigate further about the classlev option to control the alignment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the alignment of the summary result,actually i want the results to be printed at the start of every new soc value.So rather than moving the display to left or right, i want it to move it to the top from its current position which is at the bottom.I have shown this by teh arrow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4863iF52E92DA0A201B66/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="proc tabulate outpt.png" title="proc tabulate outpt.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 16:48:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-creating-report-using-Tabulate/m-p/297212#M16824</guid>
      <dc:creator>sameer_123</dc:creator>
      <dc:date>2016-09-08T16:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in creating report using Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-creating-report-using-Tabulate/m-p/297218#M16825</link>
      <description>&lt;P&gt;Did you note this change to your code in my response:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(ALL&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'Total'&lt;/SPAN&gt;PRODUCT&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;''&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token operator"&gt;Moving the ALL to before the Product means the summary occurs before the product categories (above in this case)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 18:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-creating-report-using-Tabulate/m-p/297218#M16825</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-08T18:01:40Z</dc:date>
    </item>
  </channel>
</rss>

