<?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: Sorting of Data in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275905#M16018</link>
    <description>&lt;P&gt;a) you did not include the SORT code for Work.ZHSummary&lt;/P&gt;
&lt;P&gt;b) hint: use the code window (little running man symbol) to post SAS code, as it will be much easier to read/comprehend. Similarly, use the {i} button to post other text that needs a fixed-width font (log output eg)&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jun 2016 09:12:48 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-06-08T09:12:48Z</dc:date>
    <item>
      <title>Sorting of Data</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275904#M16017</link>
      <description>&lt;P&gt;Hi every one,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have sorted the data in table and it is giving the correct output. But the same is not showing correctly in the PDF output. Kindly resolve.&lt;/P&gt;&lt;P&gt;This is my code.&lt;BR /&gt;data Work.Want;&lt;BR /&gt;set Work.ZHSummary;&lt;BR /&gt;array nums _numeric_;&lt;BR /&gt;do over nums;&lt;BR /&gt;if nums=. then nums=0;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;proc report data=Work.Want&lt;/P&gt;&lt;P&gt;style(header)=[bordercolor=BLACK background=#97291E foreground=white font=(zurichbt,6pt) font_weight=bold ]&lt;BR /&gt;style(report)=[bordercolor=black borderwidth=1pt font=(zurichbt,6pt)]&lt;BR /&gt;style(column)=[background=#FFFFFF bordercolor=#000000 font=(zurichbt,5pt) vjust=middle cellheight= 0.10in]&lt;BR /&gt;style(summary)=[font_face=White] center split='_';&lt;BR /&gt;column('ZH &amp;amp; Bucket wise Performance :' ZHName)('Bucket' BKT)('TotalBook' TBCount TBPos)('Renewal' TRCount TRPos)('Run Down' TCCount TCPos)('Opportunity to renewal' NR1Count NR1Pos NR1Elb)('Potential Auction cases' NR2Count NR2Pos NR2Elb)('Renewal %' TPCount TPPos)('Run Down%' Closurecount ClosurePos)('Resolution %' TotalCount TotalBook);&lt;/P&gt;&lt;P&gt;define ZHName / 'ZH Name' group;&lt;BR /&gt;define BKT / 'Bucket' group;&lt;BR /&gt;break after ZHName /summarize ol skip style=[background=darkgray foreground=black bordercolor=black font=(zurichbt,5pt)font_weight=bold];&lt;/P&gt;&lt;P&gt;define TBCount/ 'Total Count' sum center;&lt;BR /&gt;define TBPos/ 'Total Book' sum format=BESTX9.1 center;&lt;BR /&gt;define TRCount/ 'Count' sum center;&lt;BR /&gt;define TRPos/ 'POS' sum format=BESTX9.1 center;&lt;BR /&gt;define TCCount/ 'Count' sum center;&lt;BR /&gt;define TCPos/ 'POS' sum format=BESTX9.1 center;&lt;BR /&gt;define NR1Count/ 'Count' sum center;&lt;BR /&gt;define NR1Pos/ 'POS' sum format=BESTX9.1 center;&lt;BR /&gt;define NR1Elb/ 'Elb' sum format=BESTX9.1 center;&lt;BR /&gt;define NR2Count/ 'Count' sum center;&lt;BR /&gt;define NR2Pos/ 'POS' sum format=BESTX9.1 center;&lt;BR /&gt;define NR2Elb/ 'Elb' sum format=BESTX9.1 center;&lt;BR /&gt;define TPcount/ 'count' computed format=Percent11.1 center;&lt;BR /&gt;define TPPos/ '% of Book' computed format=Percent11.1 center;&lt;BR /&gt;define Closurecount/ 'count' computed format=Percent11.1 center;&lt;BR /&gt;define Closurepos/ '% of Book' computed format=Percent11.1 center;&lt;BR /&gt;define TotalCount/ '% of count' computed format=Percent11.1 center;&lt;BR /&gt;define TotalBook/ '% of Book' computed format=Percent11.1 center;&lt;/P&gt;&lt;P&gt;compute TPcount;&lt;BR /&gt;TPcount=TRCount.sum/TBCount.sum;&lt;BR /&gt;endcomp;&lt;BR /&gt;compute TPPos;&lt;BR /&gt;TPPos=TRPos.sum/TBPos.sum;&lt;BR /&gt;endcomp;&lt;BR /&gt;compute Closurecount;&lt;BR /&gt;Closurecount=TCCount.sum/TBCount.sum;&lt;BR /&gt;endcomp;&lt;BR /&gt;compute Closurepos;&lt;BR /&gt;Closurepos=TCPos.sum/TBPos.sum;&lt;BR /&gt;endcomp;&lt;BR /&gt;compute TotalCount;&lt;BR /&gt;TotalCount=(TRCount.sum + TCCount.sum)/TBCount.sum;&lt;BR /&gt;endcomp;&lt;BR /&gt;compute TotalBook;&lt;BR /&gt;TotalBook=(TRPos.sum + TCPos.sum)/TBPos.sum;&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;/*rbreak after /summarize;&lt;/P&gt;&lt;P&gt;compute after;&lt;BR /&gt;if _break_ = '_RBREAK_' then do ZHName="Total";&lt;BR /&gt;call define (_row_,'style', 'style=[background=CXFF8000 foreground=Black bordercolor=black font=(zurichbt,5pt)font_weight=bold]' );&lt;BR /&gt;end;endcomp;*/run;title1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 08:55:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275904#M16017</guid>
      <dc:creator>aarathi</dc:creator>
      <dc:date>2016-06-08T08:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting of Data</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275905#M16018</link>
      <description>&lt;P&gt;a) you did not include the SORT code for Work.ZHSummary&lt;/P&gt;
&lt;P&gt;b) hint: use the code window (little running man symbol) to post SAS code, as it will be much easier to read/comprehend. Similarly, use the {i} button to post other text that needs a fixed-width font (log output eg)&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 09:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275905#M16018</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-08T09:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting of Data</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275906#M16019</link>
      <description>&lt;P&gt;But i have already sorted the data in the table. &amp;nbsp;i don't want to sort it again.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 09:15:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275906#M16019</guid>
      <dc:creator>aarathi</dc:creator>
      <dc:date>2016-06-08T09:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting of Data</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275910#M16020</link>
      <description>&lt;P&gt;The problem is that whilst you may have a dataset which is sorted before the proc report, you are applying grouping within the proc report which intrinsically sorts the data:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;define ZHName / 'ZH Name' group;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;define BKT / 'Bucket' group;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This will automatcially sort the data per the grouping criteria. &amp;nbsp;Now I personally never use grouping and calculations in a proc report - I prefer to create a dataset as I want to see in the output, assigning ordersa and page breaking etc. &amp;nbsp;Then the proc report is simple, and you can use:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;define &amp;nbsp;&amp;lt;variable&amp;gt; / order order=data;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This sorts the data as it appears in the dataset. &amp;nbsp;I don't think that is available for groups.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So my suggestion is to remove the group/computes, and do that in the datastep before the proc report.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 09:40:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275910#M16020</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-08T09:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting of Data</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275915#M16021</link>
      <description>&lt;P&gt;This is working . but i am not able to use the break statement .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 10:02:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275915#M16021</guid>
      <dc:creator>aarathi</dc:creator>
      <dc:date>2016-06-08T10:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting of Data</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275917#M16022</link>
      <description>&lt;P&gt;You mean this line:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;break after ZHName /summarize&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, you can't summarize on order data. &amp;nbsp;As I said in my post I don't do calculating in proc reports. &amp;nbsp;I do all calculations manipulations and such like in a datastep before the proc report, so the output dataset looks exactly as I want it, then I proc report that.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cynthia may be able to help, I will move your post over to ODS section, but me personally I don't like data processing in a output procedure.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 10:16:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sorting-of-Data/m-p/275917#M16022</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-08T10:16:44Z</dc:date>
    </item>
  </channel>
</rss>

